# OfficeWorkflowStreamOutput

A user-selected provider destination with verified direct writes and durable recovery.

Class 

`OfficeIMO.Workflows`

**Namespace**

`OfficeIMO.Workflows`

**Assembly**

`OfficeIMO.Workflows`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeWorkflowStreamOutput.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflowStreamOutput.cs#L7)

**Modifiers**

sealed

A user-selected provider destination with verified direct writes and durable recovery.

## Inheritance

- object
- OfficeWorkflowStreamOutput

## Remarks

Only Replace is supported. A provider cannot guarantee atomic replacement, exclusive creation, or rollback.

## Usage

Explore 7 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 6

- Property [ImageOcrWorkflowRequest.OutputStream](/api/workflows/officeimo-workflows-imageocrworkflowrequest/#property-outputstream)
- Property [OfficeInvoiceStorageWorkflowRequest.OutputStream](/api/workflows/officeimo-workflows-officeinvoicestorageworkflowrequest/#property-outputstream)
- Property [OfficeWorkflowDirectoryOutputFile.Output](/api/workflows/officeimo-workflows-officeworkflowdirectoryoutputfile/#property-output)
- Property [OfficeWorkflowRequest.OutputStream](/api/workflows/officeimo-workflows-officeworkflowrequest/#property-outputstream)
- Property [PdfAssemblyRequest.OutputStream](/api/workflows/officeimo-workflows-pdfassemblyrequest/#property-outputstream)
- Property [PdfSearchableWorkflowRequest.OutputStream](/api/workflows/officeimo-workflows-pdfsearchableworkflowrequest/#property-outputstream)

### Accepted by parameters 1

- Constructor [OfficeWorkflowDirectoryOutputFile.OfficeWorkflowDirectoryOutputFile](/api/workflows/officeimo-workflows-officeworkflowdirectoryoutputfile/#constructor-ctor-string-officeimo-workflows-officeworkflowstreamoutput) parameter `output`

Filter members 

Show inherited

## Constructors

`public OfficeWorkflowStreamOutput(string name, Func<CancellationToken, Task<Stream>> openRead, Func<CancellationToken, Task<Stream>> openWrite, OfficeWorkflowOutputRecoveryStore recoveryStore, Func<CancellationToken, Task<string>>? prepareDestination = null)` [#](#member-aada9adcf9f950e547c84566)

[OfficeWorkflowStreamOutput.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflowStreamOutput.cs#L7)

Creates a destination. The host must explain and obtain consent for direct provider writes.

Parameters

**name string required**

**openRead System.Func<System.Threading.CancellationToken, System.Threading.Tasks.Task<System.IO.Stream>> required**

**openWrite System.Func<System.Threading.CancellationToken, System.Threading.Tasks.Task<System.IO.Stream>> required**

**recoveryStore OfficeIMO.Workflows.OfficeWorkflowOutputRecoveryStore required**

**prepareDestination System.Func<System.Threading.CancellationToken, System.Threading.Tasks.Task<string>>? = null optional**

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public string Name { get; }` [#](#property-name)

[OfficeWorkflowStreamOutput.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflowStreamOutput.cs#L19)

Gets the selected filename, including its output format extension.

`public Func<CancellationToken, Task<Stream>> OpenRead { get; }` [#](#property-openread)

[OfficeWorkflowStreamOutput.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflowStreamOutput.cs#L23)

Gets the factory used to establish local provider access and verify committed contents after closing the write stream.

`public Func<CancellationToken, Task<Stream>> OpenWrite { get; }` [#](#property-openwrite)

[OfficeWorkflowStreamOutput.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflowStreamOutput.cs#L25)

Gets the factory that opens a destructive write stream. The runner closes every returned stream.

`public OfficeWorkflowOutputRecoveryStore RecoveryStore { get; }` [#](#property-recoverystore)

[OfficeWorkflowStreamOutput.cs:27](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflowStreamOutput.cs#L27)

Gets the durable store used before any destination write begins.

`public Func<CancellationToken, Task<string>>? PrepareDestination { get; }` [#](#property-preparedestination)

[OfficeWorkflowStreamOutput.cs:33](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Workflows/OfficeWorkflowStreamOutput.cs#L33)

Gets optional deferred creation for a new provider child, returning its actual location.

<!-- PowerForge markdown artifact sha256:6B7745769B243959B0C12B79C3F8E54419D38C6AB97CD55094071DBB51724085 -->
