Search Results for

    Show / Hide Table of Contents
    View Source

    Interface ILongRunningOperationRepository

    Represents a repository for managing long-running operations.

    Namespace: Umbraco.Cms.Core.Persistence.Repositories
    Assembly: Umbraco.Core.dll
    Syntax
    public interface ILongRunningOperationRepository

    Methods

    View Source

    CleanOperationsAsync(DateTimeOffset)

    Cleans up long-running operations that haven't been updated for a certain period of time.

    Declaration
    Task CleanOperationsAsync(DateTimeOffset olderThan)
    Parameters
    Type Name Description
    DateTimeOffset olderThan

    The cutoff date and time for operations to be considered for deletion.

    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task representing the asynchronous operation.

    View Source

    CreateAsync(LongRunningOperation, DateTimeOffset)

    Creates a new long-running operation.

    Declaration
    Task CreateAsync(LongRunningOperation operation, DateTimeOffset expirationDate)
    Parameters
    Type Name Description
    LongRunningOperation operation

    The operation to create.

    DateTimeOffset expirationDate

    The date and time when the operation should be considered stale.

    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task representing the asynchronous operation.

    View Source

    GetAsync(Guid)

    Retrieves a long-running operation by its ID.

    Declaration
    Task<LongRunningOperation?> GetAsync(Guid id)
    Parameters
    Type Name Description
    Guid id

    The unique identifier of the long-running operation.

    Returns
    Type Description
    Task<LongRunningOperation>

    The long-running operation if found; otherwise, null.

    View Source

    GetAsync<T>(Guid)

    Retrieves a long-running operation by its ID.

    Declaration
    Task<LongRunningOperation<T>?> GetAsync<T>(Guid id)
    Parameters
    Type Name Description
    Guid id

    The unique identifier of the long-running operation.

    Returns
    Type Description
    Task<LongRunningOperation<T>>

    The long-running operation if found; otherwise, null.

    Type Parameters
    Name Description
    T

    The type of the result of the long-running operation.

    View Source

    GetByTypeAsync(string, LongRunningOperationStatus[], int, int)

    Gets all long-running operations of a specific type, optionally filtered by their statuses.

    Declaration
    Task<PagedModel<LongRunningOperation>> GetByTypeAsync(string type, LongRunningOperationStatus[] statuses, int skip, int take)
    Parameters
    Type Name Description
    string type

    Type of the long-running operation.

    LongRunningOperationStatus[] statuses

    Array of statuses to filter the operations by.

    int skip

    Number of entries to skip.

    int take

    Number of entries to take.

    Returns
    Type Description
    Task<PagedModel<LongRunningOperation>>

    A paged model of LongRunningOperation objects.

    View Source

    GetStatusAsync(Guid)

    Gets the status of a long-running operation by its unique identifier.

    Declaration
    Task<LongRunningOperationStatus?> GetStatusAsync(Guid id)
    Parameters
    Type Name Description
    Guid id

    The unique identifier for the operation.

    Returns
    Type Description
    Task<LongRunningOperationStatus?>

    The long-running operation if found; otherwise, null.

    View Source

    SetResultAsync<T>(Guid, T)

    Sets the result of a long-running operation identified by its ID.

    Declaration
    Task SetResultAsync<T>(Guid id, T result)
    Parameters
    Type Name Description
    Guid id

    The unique identifier of the long-running operation.

    T result

    The result of the operation.

    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task representing the asynchronous operation.

    Type Parameters
    Name Description
    T

    The type of the result.

    View Source

    UpdateStatusAsync(Guid, LongRunningOperationStatus, DateTimeOffset)

    Updates the status of a long-running operation identified by its ID.

    Declaration
    Task UpdateStatusAsync(Guid id, LongRunningOperationStatus status, DateTimeOffset expirationDate)
    Parameters
    Type Name Description
    Guid id

    The unique identifier of the long-running operation.

    LongRunningOperationStatus status

    The new status to set for the operation.

    DateTimeOffset expirationDate

    The date and time when the operation should be considered stale.

    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task representing the asynchronous operation.

    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX