LicenseContext Класс
Определение
Определяет, когда можно использовать лицензированный объект, и предоставляет способ получения дополнительных служб, необходимых для поддержки лицензий, выполняемых в границах своего домена.Specifies when you can use a licensed object and provides a way of obtaining additional services needed to support licenses running within its domain.
public ref class LicenseContext : IServiceProvider
public class LicenseContext : IServiceProvider
type LicenseContext = class
interface IServiceProvider
Public Class LicenseContext
Implements IServiceProvider
- Наследование
-
LicenseContext
- Производный
- Реализации
Комментарии
Этот класс предоставляет значение по умолчанию LicenseContext .This class provides the default LicenseContext. Он реализует только поддержку во время выполнения и не поддерживает сохраненные лицензионные ключи.It implements only run-time support and does not support saved license keys.
Примечания для тех, кто наследует этот метод
Если требуется реализовать поддержку лицензий во время разработки, необходимо наследовать от этого класса и переопределить следующие члены: UsageMode , GetSavedLicenseKey(Type, Assembly) , GetService(Type) и SetSavedLicenseKey(Type, String) .If you want to implement design-time license support, you must inherit from this class, and override the following members: UsageMode, GetSavedLicenseKey(Type, Assembly), GetService(Type), and SetSavedLicenseKey(Type, String). Если необходимо реализовать сохраненные лицензионные ключи, переопределите GetSavedLicenseKey(Type, Assembly) методы и SetSavedLicenseKey(Type, String) .If you want to implement saved license keys, override the GetSavedLicenseKey(Type, Assembly) and SetSavedLicenseKey(Type, String) methods.
Дополнительные сведения о лицензировании см. в разделе руководство. Лицензирование компонентов и элементов управления.For more information about licensing, see How to: License Components and Controls.
Конструкторы
LicenseContext() |
Инициализирует новый экземпляр класса LicenseContext.Initializes a new instance of the LicenseContext class. |
Свойства
UsageMode |
При переопределении в производном классе возвращает значение, определяющее, когда можно использовать лицензию.When overridden in a derived class, gets a value that specifies when you can use a license. |
Методы
Equals(Object) |
Определяет, равен ли указанный объект текущему объекту.Determines whether the specified object is equal to the current object. (Унаследовано от Object) |
GetHashCode() |
Служит хэш-функцией по умолчанию.Serves as the default hash function. (Унаследовано от Object) |
GetSavedLicenseKey(Type, Assembly) |
При переопределении в производном классе возвращает из заданной сборки ресурсов сохраненный ключ лицензии для заданного типа.When overridden in a derived class, returns a saved license key for the specified type, from the specified resource assembly. |
GetService(Type) |
Возвращает запрашиваемую службу, если она доступна.Gets the requested service, if it is available. |
GetType() |
Возвращает объект Type для текущего экземпляра.Gets the Type of the current instance. (Унаследовано от Object) |
MemberwiseClone() |
Создает неполную копию текущего объекта Object.Creates a shallow copy of the current Object. (Унаследовано от Object) |
SetSavedLicenseKey(Type, String) |
При переопределении в производном классе задает ключ лицензии для указанного типа.When overridden in a derived class, sets a license key for the specified type. |
ToString() |
Возвращает строку, представляющую текущий объект.Returns a string that represents the current object. (Унаследовано от Object) |