
Gets the LicenseUsageMode which specifies when you can use the licensed object for the CurrentContext.Ĭreates an instance of the specified type, given a context in which you can use the licensed instance.ĬreateWithContext(Type, LicenseContext, Object)Ĭreates an instance of the specified type with the specified arguments, given a context in which you can use the licensed instance.ĭetermines whether the specified object is equal to the current object. Gets or sets the current LicenseContext, which specifies when you can use the licensed object. IsValid does not throw an exception.Ĭall Dispose on any license that is granted when the component is disposed or finalized.įor more information on licensing, see How to: License Components and Controls. Validate throws a LicenseException when it tries to create an instance without a valid license. Specify the LicenseProvider by marking the component with a LicenseProviderAttribute.Ĭall Validate or IsValid in the constructor of the component. When you create a component that you want to license, you must do the following: The class also provides the following static methods: CreateWithContext, IsValid, and Validate. The LicenseManager class provides the following static properties: CurrentContext and UsageMode. Protected Overrides Sub Dispose(ByVal disposing As Boolean) ' Insert code to perform other instance creation tasks here. License = LicenseManager.Validate(GetType(M圜ontrol), Me)

' Adds Validate to the control's constructor. ' Adds the LicenseProviderAttribute to the control. Protected override void Dispose(bool disposing) License = LicenseManager.Validate(typeof(M圜ontrol), this) Adds the LicenseProviderAttribute to the control. Insert code to perform other instance creation tasks here. License = LicenseManager::Validate( M圜ontrol::typeid, this ) Adds Validate to the control's constructor. Public ref class M圜ontrol: public Control It uses a LicenseProvider that is implemented by the LicFileLicenseProvider class.


The following code example creates a licensed control using the Validate method.
