Interface IStreamUriParser
Defines a series of members to be implemented by a type that allows interpreting a Uri and obtaining a Stream from it.
Namespace: TheXDS.MCART.Types.Base
Assembly: MCART.dll
Syntax
public interface IStreamUriParser
Properties
| Edit this page View SourcePreferFullTransfer
Gets a value that determines whether the Stream produced by this object requires being fully loaded into an in-memory read buffer.
Declaration
bool PreferFullTransfer { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceGetStream(Uri)
Gets a Stream that links to the requested resource, selecting the most appropriate method for obtaining said data stream.
Declaration
Stream? GetStream(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | Uri to open for reading. |
Returns
Type | Description |
---|---|
Stream | A Stream from which the resource pointed to by the Uri specified can be read. |
GetStreamAsync(Uri)
Gets a Stream that links to the requested resource, selecting the most appropriate method for obtaining said data stream.
Declaration
Task<Stream?> GetStreamAsync(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | Uri to open for reading. |
Returns
Type | Description |
---|---|
Task<Stream> | A Stream from which the resource pointed to by the Uri specified can be read. |
Handles(Uri)
Determines whether this IStreamUriParser can create a Stream from the specified Uri.
Declaration
bool Handles(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | Uri to check. |
Returns
Type | Description |
---|---|
bool | true if this IStreamUriParser can create a Stream from the specified Uri, false otherwise. |
Open(Uri)
Declaration
Stream? Open(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | Uri to open for reading. |
Returns
Type | Description |
---|---|
Stream | A Stream from which the resource pointed to by the Uri specified can be read. |
OpenFullTransfer(Uri)
Opens the Stream from the Uri specified, and fully loads it into a new Stream intermediate before returning it.
Declaration
Stream? OpenFullTransfer(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | Uri to open for reading. |
Returns
Type | Description |
---|---|
Stream | A Stream from which the resource pointed to by the Uri specified can be read. |
OpenFullTransferAsync(Uri)
Opens the Stream from the Uri specified, and fully loads it into a new Stream intermediate asynchronously before returning it.
Declaration
Task<Stream?> OpenFullTransferAsync(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | Uri to open for reading. |
Returns
Type | Description |
---|---|
Task<Stream> | A Stream from which the resource pointed to by the Uri specified can be read. |