ServiceLicenseProvider.ServiceLicenseContext

Namespace: Babel.Licensing Assembly: Babel.Licensing.dll

Service license context.

public class ServiceLicenseProvider.ServiceLicenseContext : IServiceLicenseContext, ILicenseContext, ILicenseServiceProvider

Inheritance

objectServiceLicenseProvider.ServiceLicenseContext

Implements

IServiceLicenseContext, ILicenseContext, ILicenseServiceProvider

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

ServiceLicenseContext(ServiceLicenseProvider, ILicenseContext)

Constructor an instance of the ServiceLicenseContext class.

public ServiceLicenseContext(ServiceLicenseProvider provider, ILicenseContext parent)

Parameters

NameDescription

The service license provider.

The parent license context.

Properties

ContextName

Get the name of the context.

public virtual string ContextName { get; }

Property Value

string

FallbackContext

Get the fallback context.

public ILicenseContext FallbackContext { get; set; }

Property Value

ILicenseContext

Settings

Get the context settings.

public ContextSettings Settings { get; set; }

Property Value

ContextSettings

ShouldRefresh

Whether the license should be refreshed on the server.

public virtual bool ShouldRefresh { get; }

Property Value

bool

UserKey

Get the user key associated with the activated license.

public virtual string UserKey { get; }

Property Value

string

Methods

Clear()

Clears the license.

public virtual void Clear()

GetService(Type)

Gets a service.

public virtual object GetService(Type serviceType)

Parameters

NameDescription

serviceType Type

Type of the service.

Returns

NameDescription

The service instance.

LoadLicenseKey(Type)

Loads license key.

public virtual string LoadLicenseKey(Type type)

Parameters

NameDescription

type Type

The type associated with the license.

Returns

NameDescription

The license key.

SaveLicenseKey(Type, string)

Saves a license key.

public virtual void SaveLicenseKey(Type type, string key)

Parameters

NameDescription

type Type

The type associated with the license.

key string

The license key.

Last updated