Show / Hide Table of Contents

Class LicenseItem

Represents a feature of License granted to an assembly.

Inheritance
System.Object
Freezable<License>
LicenseItem
Inherited Members
Freezable<License>.VerifyFrozenAccess()
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: DevZest.Licensing
Assembly: DevZest.Licensing.dll
Syntax
public class LicenseItem : Freezable<License>
Remarks

A License is created and signed by LicensePublisher which normally implemented as web service. The LicenseClient communicates with the LicensePublisher, gets the published license and stores it somewhere that can be loaded by the LicenseProviderAttribute declared as assembly attribute. To determine whether an assembly can be granted a valid license, the license provider attributes are retrieved to provide an instance of License object containing a collection of LicenseItem objects. The validation is then performed on the License object and the LicenseItem object matching the specified license item name.

Before performing the validation on the LicenseItem object, the containing License object seals it by setting its IsFrozen property to true. Any attempting to modify the LicenseItem object throws an System.InvalidOperationException. All derived classes should respect this rule by calling VerifyFrozenAccess() first in all public methods and property setters that might modify the object.

Constructors

Name Description
LicenseItem()

Initializes a new instance of LicenseItem class.

LicenseItem(String)

Initializes a new instance of LicenseItem class using specified name.

LicenseItem(String, Boolean)

Initializes a new instance of LicenseItem class using specified name, with a System.Boolean value indicates whether this LicenseItem should ignore its containing License object's ExpirationDate property.

Properties

Name Description
IsFrozen
License

Gets the containing License of this LicenseItem object.

Name

Gets the name of this LicenseItem.

OverrideExpirationDate

Gets a value indicates whether this LicenseItem should ignore its containing License object's ExpirationDate property.

Methods

Name Description
Validate()

Determines whether a valid license can be granted.

  • Improve this Doc
  • View Source
Back to top Copyright © Weifen Luo | DevZest