Provides properties and methods to add a license to a component and to manage a LicenseProvider. This class cannot be inherited.
Object
LicenseManager
[Visual Basic] NotInheritable Public Class LicenseManager [C#] public sealed class LicenseManager [C++] public __gc __sealed class LicenseManager [JScript] public class LicenseManager
LicenseManager provides the following static (in Visual Basic Shared) properties: CurrentContext and UsageMode. The class also provides the following static (Shared) methods: CreateWithContext, IsValid, Validate.
When you create a component that you want to license, you must:
For more information on licensing, see TBD.
Namespace: System.ComponentModel
Assembly: System.dll
This example creates a licensed control using the Validate method. It uses a LicenseProvider that is implemented by the LicFileLicenseProvider class.
[C#]
// Add the LicenseProviderAttribute to the control. {LicenseProvider[typeof[LicFileLicenseProvider}}] public class MyControl : RichControl { // Create a new null license. private License license = null; public MyControl () { // Add Validate to the control's constructor. license = LicenseManager.Validate(typeof(MyControl), this); // Perform other instantiation tasks. } public override void Dispose() { if (license != null) { license.Dispose(); license = null; } } protected override void Finalize() { Dispose(); base.Finalize(); } }
LicenseManager Members | System.ComponentModel Namespace | License | LicenseContext | LicenseException | LicenseProvider | LicenseProviderAttribute | LicFileLicenseProvider | LicenseUsageMode