Interface IExtensionValidationContext
Provides functionality for extension point implementers to validate extensions targeting the extension point and report warning or error messages.
Namespace: Sdl.Core.PluginFramework.Validation
Assembly: Sdl.Core.PluginFramework.dll
Syntax
public interface IExtensionValidationContext
Methods
ReportError(String, String)
Reports an error.
Declaration
void ReportError(string code, string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | code | The error code, which serves as a reference for errors of this type. |
System.String | message | The error message. |
ReportWarning(String, String)
Reports an warning.
Declaration
void ReportWarning(string code, string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | code | The error code, which serves as a reference for warnings of this type. |
System.String | message | The warning message. |
ValidateRequiredExtensionAttributeType(AuxiliaryExtensionAttribute, Type)
Utility method for use in auxiliary extension attribute implementations to validate whether the main extension attribute is of the require type.
Declaration
void ValidateRequiredExtensionAttributeType(AuxiliaryExtensionAttribute auxiliaryExtensionAttribute, Type extensionAttributeType)
Parameters
Type | Name | Description |
---|---|---|
AuxiliaryExtensionAttribute | auxiliaryExtensionAttribute | The auxiliary extension attribute that is being validated. |
System.Type | extensionAttributeType | The type of extension attribute required by the auxiliary extension attribute. |
ValidateRequiredInterface(Type)
Utility method to generate an error if the extension type does not implement the interface of the specified type.
Declaration
void ValidateRequiredInterface(Type interfaceType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | interfaceType | The interface type to check for. |