Export (0) Print
Expand All

LicenseManager Class

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.

System.Object
   System.ComponentModel.LicenseManager

[Visual Basic]
NotInheritable Public Class LicenseManager
[C#]
public sealed class LicenseManager
[C++]
public __gc __sealed class LicenseManager
[JScript]
public class LicenseManager

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.

Remarks

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:

  1. Specify the LicenseProvider by marking the component with a LicenseProviderAttribute.
  2. 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.
  3. Dispose any license that is granted when the component is disposed or finalized.

For more information on licensing, see Licensing Components and Controls.

Requirements

Namespace: System.ComponentModel

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)

See Also

LicenseManager Members | System.ComponentModel Namespace | License | LicenseContext | LicenseException | LicenseProvider | LicenseProviderAttribute | LicFileLicenseProvider | LicenseUsageMode

Show:
© 2014 Microsoft