Class LicensesRestService
- Namespace
- OpenSettings.Services.Rest
- Assembly
- OpenSettings.dll
public class LicensesRestService : ILicensesRestService, ILicensesService
- Inheritance
-
LicensesRestService
- Implements
- Inherited Members
Constructors
LicensesRestService(HttpClient)
public LicensesRestService(HttpClient httpClient)
Parameters
httpClient
HttpClient
Methods
DeleteLicenseAsync(DeleteLicenseInput, CancellationToken)
Deletes a license based on the provided input parameters.
public Task<IJsonResponse> DeleteLicenseAsync(DeleteLicenseInput input, CancellationToken cancellationToken)
Parameters
input
DeleteLicenseInputThe input parameters required to delete the license.
cancellationToken
CancellationTokenA 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.
public Task<IJsonResponse<License>> GetCurrentLicenseAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA 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.
public Task<IJsonResponse> GetPaginatedLicensesAsync(GetPaginatedLicensesInput input, CancellationToken cancellationToken)
Parameters
input
GetPaginatedLicensesInputThe input parameters for pagination and filtering.
cancellationToken
CancellationTokenA 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.
public Task<IJsonResponse> SaveLicenseAsync(string licenseKey, CancellationToken cancellationToken)
Parameters
licenseKey
stringThe license key to be saved.
cancellationToken
CancellationTokenA cancellation token to cancel the operation.