BetaRestriction

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

Defines a typically used to tag the license with beta release information. Setting an expire date for this restriction will allow to deliver software beta releases, valid for a limited time, before the delivery of the live release.

public class BetaRestriction : Restriction, IObservableObject

Inheritance

objectRestrictionBetaRestriction

Implements

IObservableObject

Inherited Members

Restriction.Validate(ILicenseContext, Type, object), Restriction.Attach(IObjectListener), Restriction.Detach(IObjectListener), Restriction.Notify(params object[]), Restriction.Name, Restriction.License, Restriction.Listeners, Restriction.Id, Restriction.ExpireDate, object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Examples

// Creates a 30 days XML license for beta software 
var license = new XmlLicense();

// Add a beta information
BetaRestriction beta = new BetaRestriction();
beta.Id = "beta099";
beta.ExpireDate = DateTime.Today.AddDays(30);
beta.RecentChanges = "Added new user management";
beta.BuildType = "Beta";

license.Restrictions.Add(beta);

// Generate the license key
var signer = XmlDigitalSignature.CreateFromKeyFile("Keys.snk");
string licenseXml = license.SignWith(signer).ToReadableString();

Constructors

BetaRestriction()

Initializes a new instance of the class.

public BetaRestriction()

Properties

BuildType

Gets the type of the build for this beta release.

public string BuildType { get; set; }

Property Value

string

Name

Gets the restriction name.

public override string Name { get; }

Property Value

string

RecentChanges

Gets this beta recent changes.

public string RecentChanges { get; set; }

Property Value

string

Last updated