DataWeb
Search Results for

    Show / Hide Table of Contents

    Class TermsService

    Represents a service for managing terms approvals.

    Inheritance
    object
    TermsService
    Implements
    ITermsService
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: DataWeb.Terms
    Assembly: DataWeb.Core.dll
    Syntax
    public class TermsService : ITermsService
    Remarks

    Creates an instance of the TermsService class.

    Constructors

    TermsService(IHttpService, ITermsApprovalStore, TimeProvider)

    Represents a service for managing terms approvals.

    Declaration
    public TermsService(IHttpService httpService, ITermsApprovalStore termsApprovalStore, TimeProvider timeProvider)
    Parameters
    Type Name Description
    IHttpService httpService

    The HTTP service used to retrieve request URL and remote IP.

    ITermsApprovalStore termsApprovalStore

    The store used to persist terms approvals.

    TimeProvider timeProvider

    The time provider used to get the current date and time.

    Remarks

    Creates an instance of the TermsService class.

    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

    Cancellation token.

    Returns
    Type Description
    Task<TermsApproval>

    An asynchronous operation that returns a terms approval, or null if no match is found.

    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

    Cancellation token.

    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

    Cancellation token.

    Returns
    Type Description
    Task

    An asynchronous operation that sets the terms approval.

    TermsApprovalExistsAsync(TermsApprovalFilter, CancellationToken)

    Determines whether a terms approval matching the provided filter exists.

    Declaration
    public Task<bool> TermsApprovalExistsAsync(TermsApprovalFilter filter, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    TermsApprovalFilter filter

    The TermsApprovalFilter to apply when checking for an existing terms approval.

    CancellationToken cancellationToken

    Cancellation token.

    Returns
    Type Description
    Task<bool>

    true if a matching terms approval exists; otherwise, false.

    Implements

    ITermsService
    In this article
    Back to top Generated by DocFX