RequiresServiceAttribute.CreateSubscription Method
Creates an object that enables notification when the requirement specified by this attribute is fulfilled by the editing context.
Namespace: Microsoft.Windows.Design
Assembly: Microsoft.Windows.Design.Extensibility (in Microsoft.Windows.Design.Extensibility.dll)
Syntax
'Declaration
Public Overrides Function CreateSubscription ( _
context As EditingContext _
) As RequirementSubscription
public override RequirementSubscription CreateSubscription(
EditingContext context
)
public:
virtual RequirementSubscription^ CreateSubscription(
EditingContext^ context
) override
abstract CreateSubscription :
context:EditingContext -> RequirementSubscription
override CreateSubscription :
context:EditingContext -> RequirementSubscription
public override function CreateSubscription(
context : EditingContext
) : RequirementSubscription
Parameters
- context
Type: Microsoft.Windows.Design.EditingContext
The editing context to check.
Return Value
Type: Microsoft.Windows.Design.RequirementSubscription
A RequirementSubscription object that you can use to handle events.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | context is nulla null reference (Nothing in Visual Basic). |
Remarks
The RequirementSubscription object created by the CreateSubscription method allows the caller to be notified when the required ServiceType is available in the editing context.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
RequiresServiceAttribute Class
Microsoft.Windows.Design Namespace