Class ValidationSuite
The validation suite allows you to validate a package while in development
Namespace: UnityEditor.PackageManager.ValidationSuite
Syntax
[InitializeOnLoad]
public class ValidationSuite
Constructors
ValidationSuite()
Declaration
public ValidationSuite()
Methods
GetReport(String)
Get the validation suite report for the given package id.
Declaration
public static ValidationSuiteReportData GetReport(string packageId)
Parameters
| Type | Name | Description |
|---|---|---|
| String | packageId | Package Id in the format of [package name]@[package version]. |
Returns
| Type | Description |
|---|---|
| ValidationSuiteReportData | The validation suite report. |
GetValidationSuiteReport(String)
Get the validation suite report for the given package id.
Declaration
public static string GetValidationSuiteReport(string packageId)
Parameters
| Type | Name | Description |
|---|---|---|
| String | packageId | Package Id in the format of [package name]@[package version]. |
Returns
| Type | Description |
|---|---|
| String | The validation suite report as a string. |
GetValidationSuiteReport(String, String)
Get the validation suite report for the given package.
Declaration
public static string GetValidationSuiteReport(string packageName, string packageVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| String | packageName | Package name. |
| String | packageVersion | Package version. |
Returns
| Type | Description |
|---|---|
| String | The validation suite report as a string. |
JsonReportExists(String)
Find out if the validation suite report exists for the given package id.
Declaration
public static bool JsonReportExists(string packageId)
Parameters
| Type | Name | Description |
|---|---|---|
| String | packageId | Package Id in the format of [package name]@[package version]. |
Returns
| Type | Description |
|---|---|
| Boolean | True if the validation suite report exists. |
ReportExists(String)
Find out if the validation suite report exists for the given package id.
Declaration
public static bool ReportExists(string packageId)
Parameters
| Type | Name | Description |
|---|---|---|
| String | packageId | Package Id in the format of [package name]@[package version]. |
Returns
| Type | Description |
|---|---|
| Boolean | True if the validation suite report exists. |
ValidatePackage(String, String, String[])
Declaration
public static bool ValidatePackage(string packageName, string packageVersion, string[] packageIdsForPromotion)
Parameters
| Type | Name | Description |
|---|---|---|
| String | packageName | |
| String | packageVersion | |
| String[] | packageIdsForPromotion |
Returns
| Type | Description |
|---|---|
| Boolean |
ValidatePackage(String, String, ValidationType)
Validate a package for the given validation context.
Declaration
public static bool ValidatePackage(string packageName, string packageVersion, ValidationType validationType)
Parameters
| Type | Name | Description |
|---|---|---|
| String | packageName | The name of the package to validate. |
| String | packageVersion | The version of the package to validate. |
| ValidationType | validationType | The type of validation to assess. |
Returns
| Type | Description |
|---|---|
| Boolean | True if the validation successfully completed. |
ValidatePackage(String, ValidationType)
Validate a package for the given validation context.
Declaration
public static bool ValidatePackage(string packageId, ValidationType validationType)
Parameters
| Type | Name | Description |
|---|---|---|
| String | packageId | Package Id in the format of [package name]@[package version]. |
| ValidationType | validationType | The type of validation to assess. |
Returns
| Type | Description |
|---|---|
| Boolean | True if the validation successfully completed. |
ValidatePackage(VettingContext, out ValidationSuiteReport)
Declaration
public static bool ValidatePackage(VettingContext context, out ValidationSuiteReport report)
Parameters
| Type | Name | Description |
|---|---|---|
| VettingContext | context | |
| ValidationSuiteReport | report |
Returns
| Type | Description |
|---|---|
| Boolean |
ValidatePackage(VettingContext, ValidationType, out ValidationSuiteReport)
Declaration
public static bool ValidatePackage(VettingContext context, ValidationType validationType, out ValidationSuiteReport report)
Parameters
| Type | Name | Description |
|---|---|---|
| VettingContext | context | |
| ValidationType | validationType | |
| ValidationSuiteReport | report |
Returns
| Type | Description |
|---|---|
| Boolean |