FulcrumFS FulcrumFS
FulcrumFS FulcrumFS
DocFX + Singulink = ♥

Search Results for

    Method AddAsync

    AddAsync(FileStream, bool, IFileProcessingPipelineSelector, CancellationToken)

    Adds a new file to the repository with the specified file stream, processing it through the specified file pipeline.

    Declaration
    public TaskWithProgress<RepoFileGroupInfo> AddAsync(FileStream stream, bool leaveOpen, IFileProcessingPipelineSelector pipeline, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    FileStream stream

    The source file stream.

    bool leaveOpen

    Indicates whether to leave the stream open after the operation completes.

    IFileProcessingPipelineSelector pipeline

    The processing pipeline provider to use.

    CancellationToken cancellationToken

    A cancellation token that cancels the operation.

    Returns
    Type Description
    TaskWithProgress<RepoFileGroupInfo>

    The resulting file group, including the main file and any auto-variants produced by the pipeline.

    Exceptions
    Type Condition
    InvalidOperationException

    The transaction has been staged or rolled back.

    AddAsync(Stream, string, bool, IFileProcessingPipelineSelector, CancellationToken)

    Adds a new file to the repository with the specified stream and extension, processing it through the specified file pipeline.

    Declaration
    public TaskWithProgress<RepoFileGroupInfo> AddAsync(Stream stream, string extension, bool leaveOpen, IFileProcessingPipelineSelector pipeline, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    Stream stream

    The source stream.

    string extension

    The source file extension.

    bool leaveOpen

    Indicates whether to leave the stream open after the operation completes.

    IFileProcessingPipelineSelector pipeline

    The processing pipeline provider to use.

    CancellationToken cancellationToken

    A cancellation token that cancels the operation.

    Returns
    Type Description
    TaskWithProgress<RepoFileGroupInfo>

    The resulting file group, including the main file and any auto-variants produced by the pipeline.

    Remarks

    The file is added exactly as by AddAsync(Stream, string, bool, IFileProcessingPipelineSelector, CancellationToken) and is committed or rolled back together with the transaction's deletions.

    Exceptions
    Type Condition
    InvalidOperationException

    The transaction has been staged or rolled back.

    © Singulink. All rights reserved.