Class ValidationResultSet
A "bucket" class that filters out redundant validation messages and allows for filtering the set of validation results by resource and specific validation status types
Inheritance
System.Object
ValidationResultSet
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: OSGeo.MapGuide.MaestroAPI.Resource.Validation
Assembly: OSGeo.MapGuide.MaestroAPI.dll
Syntax
public class ValidationResultSet
Examples
This example shows how a ValidationResultSet is used
IResource resource;
IServerConnection conn;
...
var context = new ResourceValidationContext(conn);
var issues = ResourceValidatorSet.Validate(context, item, false);
var results = new ValidationResultSet(issues);
Constructors
| Improve this Doc View SourceValidationResultSet()
Initializes a new instance of the ValidationResultSet class.
Declaration
public ValidationResultSet()
ValidationResultSet(IEnumerable<ValidationIssue>)
Initializes a new instance of the ValidationResultSet class.
Declaration
public ValidationResultSet(IEnumerable<ValidationIssue> issues)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<ValidationIssue> | issues | The issues. |
Properties
| Improve this Doc View SourceResourceIDs
Gets the resource IDs
Declaration
public string[] ResourceIDs { get; }
Property Value
Type | Description |
---|---|
System.String[] | The resource IDs. |
Methods
| Improve this Doc View SourceAddIssue(ValidationIssue)
Adds the issue.
Declaration
public void AddIssue(ValidationIssue issue)
Parameters
Type | Name | Description |
---|---|---|
ValidationIssue | issue | The issue. |
AddIssues(IEnumerable<ValidationIssue>)
Adds the issues.
Declaration
public void AddIssues(IEnumerable<ValidationIssue> issues)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<ValidationIssue> | issues | The issues. |
GetAllIssues()
Gets all issues.
Declaration
public ValidationIssue[] GetAllIssues()
Returns
Type | Description |
---|---|
ValidationIssue[] |
GetAllIssues(ValidationStatus[])
Gets all issues filtered by the specified validation status types
Declaration
public ValidationIssue[] GetAllIssues(params ValidationStatus[] statTypes)
Parameters
Type | Name | Description |
---|---|---|
ValidationStatus[] | statTypes |
Returns
Type | Description |
---|---|
ValidationIssue[] |
GetIssuesForResource(String)
Gets the issues for resource.
Declaration
public ICollection<ValidationIssue> GetIssuesForResource(string resourceId)
Parameters
Type | Name | Description |
---|---|---|
System.String | resourceId | The resource id. |
Returns
Type | Description |
---|---|
System.Collections.Generic.ICollection<ValidationIssue> |
GetIssuesForResource(String, ValidationStatus)
Gets the issues for resource.
Declaration
public ICollection<ValidationIssue> GetIssuesForResource(string resourceId, ValidationStatus statType)
Parameters
Type | Name | Description |
---|---|---|
System.String | resourceId | The resource id. |
ValidationStatus | statType | Type of the stat. |
Returns
Type | Description |
---|---|
System.Collections.Generic.ICollection<ValidationIssue> |