Class FeatureInfo
Provides information about a licensed feature.
Inheritance
Namespace: Sartorius.SAF.Licensing
Assembly: Sartorius.SAF.Licensing.dll
Syntax
[Serializable]
public class FeatureInfo
Constructors
View SourceFeatureInfo()
Initializes a new instance of the FeatureInfo class.
Declaration
public FeatureInfo()
FeatureInfo(String, String, Nullable<DateTime>, FeatureState, Int32)
Create and initialize a new instance of FeatureInfo.
Declaration
public FeatureInfo(string id, string name, DateTime? expiredOn, FeatureState state, int totalLicenses)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The feature id. |
System.String | name | The feature name. |
System.Nullable<System.DateTime> | expiredOn | An expiration date of the feature. |
FeatureState | state | The feature state FeatureState |
System.Int32 | totalLicenses | A count of the total licenses |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | The System.DateTimeKind of |
FeatureInfo(String, String, Nullable<DateTime>, FeatureState, Int32, Int32)
Create and initialize a new instance of FeatureInfo.
Declaration
public FeatureInfo(string id, string name, DateTime? expiredOn, FeatureState state, int remainingLicenses, int totalLicenses)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The feature id. |
System.String | name | The feature name. |
System.Nullable<System.DateTime> | expiredOn | An expiration date of the feature. |
FeatureState | state | The feature state FeatureState |
System.Int32 | remainingLicenses | A count of available feature licenses. |
System.Int32 | totalLicenses | A count of the total licenses |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | The System.DateTimeKind of |
Properties
View SourceExpirationDate
Gets the time the feature expires.
Declaration
public DateTime? ExpirationDate { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.DateTime> | The expiration date. |
Remarks
The underlying implementation of the ILicenseProvider should set System.DateTime.Kind to specify the System.DateTimeKind.
ID
Gets the unique identifier of the feature.
Declaration
public string ID { get; set; }
Property Value
Type | Description |
---|---|
System.String | The unique identifier of the feature. |
MaintenanceEnd
Gets the end of the maintenance period.
Declaration
public DateTime? MaintenanceEnd { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.DateTime> | The end of the maintenance period. |
Remarks
The underlying implementation of the ILicenseProvider should set System.DateTime.Kind to specify the System.DateTimeKind.
Name
Gets the name of the feature.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name. |
Properties
Gets a list of additional license information.
Declaration
public IReadOnlyDictionary<string, object> Properties { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyDictionary<System.String, System.Object> | A list of additional license feature information or null if not any defined. |
RemainingLicenses
Gets the version the feature is licensed for.
Declaration
public int RemainingLicenses { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The version the feature is licensed for. |
Remarks
Will always be null
if the underlying provider does not support versions.
State
Gets the current state of the feature.
Declaration
public FeatureState State { get; set; }
Property Value
Type | Description |
---|---|
FeatureState | The state. |
TotalLicenses
Gets the license count.
Declaration
public int TotalLicenses { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The license count. |
Version
Gets the version the feature is licensed for.
Declaration
public Version Version { get; set; }
Property Value
Type | Description |
---|---|
System.Version | The version the feature is licensed for. |
Remarks
Will always be null
if the underlying provider does not support versions.
Methods
View SourceAddProperty(String, Object)
Add a given property. If the given property already exist, the new value override the old value.
Declaration
public void AddProperty(string key, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | A property key. |
System.Object | value | A property value |