Method OpenDocumentAsync
OpenDocumentAsync(string?, bool, CancellationToken)
Opens a document
Declaration
Task<IDocument?> OpenDocumentAsync(string? uri, bool allowUserInteraction, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | uri | The URI path to the document file |
| bool | allowUserInteraction | A value indicating whether user interaction is allowed |
| CancellationToken | cancellationToken | The optional cancellation token |
Returns
| Type | Description |
|---|---|
| Task<IDocument> |
OpenDocumentAsync(FileStream?, bool, CancellationToken)
Opens a document from a FileStream
Declaration
Task<IDocument?> OpenDocumentAsync(FileStream? file, bool allowUserInteraction, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| FileStream | file | The FileStream |
| bool | allowUserInteraction | A value indicating whether user interaction is allowed |
| CancellationToken | cancellationToken | The optional cancellation token |
Returns
| Type | Description |
|---|---|
| Task<IDocument> |