Class TermsService
Represents a service for managing terms approvals
Implements
Inherited Members
Namespace: DataWeb.Terms
Assembly: DataWeb.Core.dll
Syntax
public class TermsService : ITermsService
Remarks
Creates an instance of the terms service
Constructors
TermsService(IHttpService, ITermsApprovalStore)
Represents a service for managing terms approvals
Declaration
public TermsService(IHttpService httpService, ITermsApprovalStore termsApprovalStore)
Parameters
Type | Name | Description |
---|---|---|
IHttpService | httpService | An HTTP service used to retrieve the remote IP address and request URL |
ITermsApprovalStore | termsApprovalStore | A store used to access terms approvals data |
Remarks
Creates an instance of the terms service
Methods
GetTermsApprovalAsync(TermsApprovalFilter, CancellationToken)
Get a terms approval that matches the provided filter
Declaration
public Task<TermsApproval> GetTermsApprovalAsync(TermsApprovalFilter filter, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
TermsApprovalFilter | filter | The TermsApprovalFilter to apply when retrieving a terms approval |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<TermsApproval> | An asynchronous operation that returns a terms approval |
GetTermsApprovalsAsync(TermsApprovalFilter, CancellationToken)
Get a collection of terms approvals that match the provided filter
Declaration
public Task<IEnumerable<TermsApproval>> GetTermsApprovalsAsync(TermsApprovalFilter filter, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
TermsApprovalFilter | filter | The TermsApprovalFilter to apply when retrieving terms approvals |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<IEnumerable<TermsApproval>> | An asynchronous operation that returns a collection of terms approvals |
SetTermsApprovalAsync(string, string, string, string, CancellationToken)
Set a terms approval for a reference
Declaration
public Task SetTermsApprovalAsync(string referenceId, string referenceType, string termsName, string termsVersion, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | referenceId | The unique identifier of the reference for which to set the terms approval |
string | referenceType | The type of the reference for which to set the terms approval |
string | termsName | The name of the terms being approved |
string | termsVersion | The version of the terms being approved |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task | An asynchronous operation that sets the terms approval |