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 Task<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 |
|---|---|
| Task<RepoFileGroupInfo> | The resulting file group, including the main file and any auto-variants produced by the pipeline. |
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 Task<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 |
|---|---|
| Task<RepoFileGroupInfo> | The resulting file group, including the main file and any auto-variants produced by the pipeline. |