Table of Contents

Interface ILicensesService

Namespace
OpenSettings.Services.Interfaces
Assembly
OpenSettings.dll

Defines the contract for managing licenses, including retrieval, validation, creation, and deletion of license data.

public interface ILicensesService

Methods

DeleteLicenseAsync(DeleteLicenseInput, CancellationToken)

Deletes a license based on the provided input parameters.

Task<IJsonResponse> DeleteLicenseAsync(DeleteLicenseInput input, CancellationToken cancellationToken)

Parameters

input DeleteLicenseInput

The input parameters required to delete the license.

cancellationToken CancellationToken

A cancellation token to cancel the operation.

Returns

Task<IJsonResponse>

A task that represents the asynchronous operation. The task result contains an Ogu.Response.Json.IJsonResponse indicating the success or failure of the operation.

GetCurrentLicenseAsync(CancellationToken)

Retrieves the current active license. This method never returns a failure.

Task<IJsonResponse<License>> GetCurrentLicenseAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A cancellation token to cancel the operation.

Returns

Task<IJsonResponse<License>>

A task that represents the asynchronous operation. The task result contains an Ogu.Response.Json.IJsonResponse with the license data. See data type: License.

GetPaginatedLicensesAsync(GetPaginatedLicensesInput, CancellationToken)

Retrieves a paginated list of licenses based on the provided input.

Task<IJsonResponse> GetPaginatedLicensesAsync(GetPaginatedLicensesInput input, CancellationToken cancellationToken)

Parameters

input GetPaginatedLicensesInput

The input parameters for pagination and filtering.

cancellationToken CancellationToken

A cancellation token to cancel the operation.

Returns

Task<IJsonResponse>

A task that represents the asynchronous operation. The task result contains an Ogu.Response.Json.IJsonResponse with the paginated list of licenses. See data type: GetPaginatedLicensesResponse.

SaveLicenseAsync(string, CancellationToken)

Saves the provided license key.

Task<IJsonResponse> SaveLicenseAsync(string licenseKey, CancellationToken cancellationToken)

Parameters

licenseKey string

The license key to be saved.

cancellationToken CancellationToken

A cancellation token to cancel the operation.

Returns

Task<IJsonResponse>

A task that represents the asynchronous operation. The task result contains an Ogu.Response.Json.IJsonResponse with the license data. See data type: License.