License Class

Namespace:
Weavy.Core.Models
Assembly:
Weavy.Core.dll

An object representing a license.

Properties in this class must be kept in sync with the Weavy.Shared.Models.License class.

public class License
Inheritance:
System.Object → License

Constructors

License() Initializes a new instance of the License class.

Properties

ExpiresAt Gets or sets the date and time when the license expires, null means that it never expires.
GraceDays Gets or sets the number of days that the license will continue to work after it has expired, null means no grace days.
IssuedTo Gets or sets the company name of the customer.
Key Gets the license key.
MaintenanceExpiresAt Gets or sets the date and time when the service and maintencence agreement expires, null means that it never expires.
MaxItems Gets or sets the maximum number of items allowed by the license, null means unlimited.
MaxSpaces Gets or sets the maximum number of spaces allowed by the license, null means unlimited.
MaxUsers Gets or sets the maximum number of users allowed by the license, null means unlimited.
Modules Gets or sets the list of modules (add-ons) allowed by the license.
Signature Gets or sets the cryptographic signature of the license.

Methods

HasModule(String) Determines whether the license has access to the specified module.
ShouldSerializeModules() Tell JSON.NET that the Modules property should not be serialized if empty.
ToString() Returns a json representation of the license.

Extension Methods

IsNullOrDefault(T) Gets a value indicating if the specified value has the default value of the generic type.
Serialize(Object) Serializes an object, or graph of connected objects, to a byte array.
SerializeToJson(Object, Nullable, JsonSerializerSettings) Serializes an object, or graph of connected objects, to a json string.
IsValid(Object) Determines whether the specified object is valid by evaluating each ValidationAttribute instance that is attached to the object type.