Class StreamUriParser
Implements
Inherited Members
Namespace: TheXDS.MCART.Types.Base
Assembly: MCART.dll
Syntax
public abstract class StreamUriParser : IStreamUriParser
Properties
| Edit this page View SourcePreferFullTransfer
Gets a value that determines if the Stream produced by this object requires to be loaded completely into an in-memory read buffer.
Declaration
public virtual bool PreferFullTransfer { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceGet(Uri)
Directly opens a Stream from which to read the
content of the uri
.
Declaration
public static Stream? Get(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | Identifier of the resource to locate. |
Returns
Type | Description |
---|---|
Stream | A Stream from which to read the content of the
|
GetAsync(Uri)
Directly opens a Stream asynchronously from which to read the
content of the uri
.
Declaration
public static Task<Stream?> GetAsync(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | Identifier of the resource to locate. |
Returns
Type | Description |
---|---|
Task<Stream> | A Stream from which to read the content of the
|
GetStream(Uri)
Gets a Stream that links to the requested resource, selecting the most appropriate method to obtain that data stream.
Declaration
public 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 to obtain that data stream.
Declaration
public 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 if this StreamUriParser can create a Stream from the specified Uri.
Declaration
public abstract bool Handles(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri | Uri to check. |
Returns
Type | Description |
---|---|
bool | true if this StreamUriParser can create a Stream from the specified Uri, false otherwise. |
Infer(string)
Gets the appropriate StreamUriParser to handle the specified Uri.
Declaration
public static StreamUriParser? Infer(string uri)
Parameters
Type | Name | Description |
---|---|---|
string | uri |
Returns
Type | Description |
---|---|
StreamUriParser | A StreamUriParser that can create a Stream from the specified Uri, or null if no StreamUriParser is capable of handling the Uri. |
Infer(Uri)
Gets the appropriate StreamUriParser to handle the specified Uri.
Declaration
public static StreamUriParser? Infer(Uri uri)
Parameters
Type | Name | Description |
---|---|---|
Uri | uri |
Returns
Type | Description |
---|---|
StreamUriParser | A StreamUriParser that can create a Stream from the specified Uri, or null if no StreamUriParser is capable of handling the Uri. |
Infer<T>(string)
Gets the appropriate StreamUriParser to handle the specified Uri.
Declaration
public static T? Infer<T>(string uri) where T : class, IStreamUriParser
Parameters
Type | Name | Description |
---|---|---|
string | uri |
Returns
Type | Description |
---|---|
T | A StreamUriParser that can create a Stream from the specified Uri, or null if no StreamUriParser is capable of handling the Uri. |
Type Parameters
Name | Description |
---|---|
T | Type of specialized StreamUriParser to obtain. |
Infer<T>(Uri)
Gets the appropriate StreamUriParser to handle the specified Uri.
Declaration
public static T? Infer<T>(Uri uri) where T : class, IStreamUriParser
Parameters
Type | Name | Description |
---|---|---|
Uri | uri |
Returns
Type | Description |
---|---|
T | A StreamUriParser that can create a Stream from the specified Uri, or null if no StreamUriParser is capable of handling the Uri. |
Type Parameters
Name | Description |
---|---|
T | Type of specialized StreamUriParser to obtain. |
Open(Uri)
Declaration
public abstract 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 specified Uri, and loads it completely into a new intermediate Stream before returning it.
Declaration
public virtual 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 specified Uri, and loads it completely into a new intermediate Stream before returning it.
Declaration
public virtual 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. |