DevZest.Licensing by DevZest

<PackageReference Include="DevZest.Licensing" Version="2.0.0" />

 LicenseProviderResult

public struct LicenseProviderResult
Represents the result of license providers, either a license XML string, or an error message string, plus an addition Data object.
public static LicenseProviderResult Empty { get; }

Represents a LicenseProviderResult structure with its properties left uninitialized.

public object Data { get; }

Gets the additional data.

public string ErrorMessage { get; }

Gets the encapsulated error message.

public bool IsEmpty { get; }

Tests whether all properties of this LicenseProviderResult have values of null.

public string License { get; }

Gets the encapsulated license XML string.

public static LicenseProviderResult FromErrorMessage(string errorMessage)

Initializes a new instance of LicenseProviderResult structure from error message string.

public static LicenseProviderResult FromErrorMessage(string errorMessage, object data)

Initializes a new instance of LicenseProviderResult structure from error message string, with additional data.

public static LicenseProviderResult FromLicense(string license)

Initializes a new instance of LicenseProviderResult from license XML string.

public static LicenseProviderResult FromLicense(string license, object data)

Initializes a new instance of LicenseProviderResult from license XML string, with additional data.