This documentation is archived and is not being maintained.

LicenseContext Class

Specifies when you can use a licensed object and provides a way of obtaining additional services needed to support licenses running within its domain.

For a list of all members of this type, see LicenseContext Members.


[Visual Basic]
Public Class LicenseContext
   Implements IServiceProvider
public class LicenseContext : IServiceProvider
public __gc class LicenseContext : public IServiceProvider
public class LicenseContext implements IServiceProvider

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.


This class provides the default LicenseContext. It implements only run-time support and does not support saved license keys.

Notes to Inheritors:  If you want to implement design-time license support, you must inherit from this class, and override the following members: UsageMode, GetSavedLicenseKey, GetService, and SetSavedLicenseKey. If you want to implement saved license keys, override the GetSavedLicenseKey and SetSavedLicenseKey methods.

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


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

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