RequirementValidator Class
Determines whether the required context and services are available for the specified type.
Inheritance Hierarchy
System.Object
Microsoft.Windows.Design.RequirementValidator
Namespace: Microsoft.Windows.Design
Assembly: Microsoft.Windows.Design.Extensibility (in Microsoft.Windows.Design.Extensibility.dll)
Syntax
'Declaration
Public NotInheritable Class RequirementValidator
public sealed class RequirementValidator
public ref class RequirementValidator sealed
[<Sealed>]
type RequirementValidator = class end
public final class RequirementValidator
The RequirementValidator type exposes the following members.
Constructors
Name | Description | |
---|---|---|
RequirementValidator | Initializes a new instance of the RequirementValidator class for the specified FeatureManager and type. |
Top
Properties
Name | Description | |
---|---|---|
MeetsRequirements | Gets a value that indicates whether the type requirements exist in the editing context. | |
PendingRequirements | Gets a list of pending requirement attributes. | |
Requirements | Gets an enumeration of all requirements for the type contained in this validator. | |
Type | Gets the type of object to validate requirements for. |
Top
Methods
Name | Description | |
---|---|---|
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Events
Name | Description | |
---|---|---|
RequirementsChanged | Occurs when the set of requirements necessary to use the type have changed. |
Top
Remarks
Use the RequirementValidator class to defer creation of objects that do not have their requirements in place. An object may specify a requirement to a service or context item by adding a RequiresServiceAttribute or RequiresContextItemAttribute on its class. Areas of the designer that automatically create objects check these attributes to make sure that the object can be used in the designer context.
You can define other types of requirements by deriving from RequirementAttribute and implementing the abstract MeetsRequirement method.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Reference
Microsoft.Windows.Design Namespace