Provides properties and methods to add a license to a component and to manage a LicenseProvider. This class cannot be inherited.
For a list of all members of this type, see LicenseManager Members.
[Visual Basic] NotInheritable Public Class LicenseManager [C#] public sealed class LicenseManager [C++] public __gc __sealed class LicenseManager [JScript] public class LicenseManager
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
LicenseManager provides the following static (Shared in Visual Basic) properties: CurrentContext and UsageMode. The class also provides the following static (Shared in Visual Basic) methods: CreateWithContext, IsValid, Validate.
When you create a component that you want to license, you must:
- Specify the LicenseProvider by marking the component with a LicenseProviderAttribute.
- Call Validate or IsValid in the constructor of the component. Validate throws a LicenseException when it tries to create an instance without a valid license. IsValid does not throw an exception.
- Dispose any license that is granted when the component is disposed or finalized.
For more information on licensing, see Licensing Components and Controls.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
Assembly: System (in System.dll)