Class FileStacExtensionExtensions
Extension methods for accessing Processing extension
Inheritance
System.Object
FileStacExtensionExtensions
Namespace: Stac.Extensions.File
Assembly: DotNetStac.dll
Syntax
public static class FileStacExtensionExtensions : object
Methods
| Improve this Doc View SourceFileExtension(StacAsset)
Initilize a EoStacExtension class from a STAC item
Declaration
public static FileStacExtension FileExtension(this StacAsset stacAsset)
Parameters
| Type | Name | Description |
|---|---|---|
| StacAsset | stacAsset | The STAC asset. |
Returns
| Type | Description |
|---|---|
| FileStacExtension | The EoStacExtension class |
SetFileCheckSum(FileStacExtension, HashType, MultibaseEncoding, Func<Uri, Stream>)
Add the checksum property of the file extension
Declaration
public static Task SetFileCheckSum(this FileStacExtension fileStacExtension, HashType hashType, MultibaseEncoding encoding, Func<Uri, Stream> uriStreamer)
Parameters
| Type | Name | Description |
|---|---|---|
| FileStacExtension | fileStacExtension | The file extension. |
| HashType | hashType | Type of the hash. |
| MultibaseEncoding | encoding | The encoding. |
| Func<Uri, Stream> | uriStreamer | The URI streamer. |
Returns
| Type | Description |
|---|---|
| Task | No object or value is returned by this method when it completes. |
SetFileExtensionProperties(FileStacExtension, FileInfo, HashType, MultibaseEncoding)
Set possibly file extension properties from a FileInfo object:
- size
- checksum
Declaration
public static Task SetFileExtensionProperties(this FileStacExtension fileStacExtension, FileInfo file, HashType hashType = null, MultibaseEncoding encoding = null)
Parameters
| Type | Name | Description |
|---|---|---|
| FileStacExtension | fileStacExtension | The file extension. |
| FileInfo | file | The file. |
| HashType | hashType | Type of the hash. |
| MultibaseEncoding | encoding | The encoding. |
Returns
| Type | Description |
|---|---|
| Task | No object or value is returned by this method when it completes. |
SetFileExtensionProperties(FileStacExtension, Stream, HashType, MultibaseEncoding)
Set possibly file extension properties from a FileInfo object:
- size
- checksum
Declaration
public static Task SetFileExtensionProperties(this FileStacExtension fileStacExtension, Stream stream, HashType hashType = null, MultibaseEncoding encoding = null)
Parameters
| Type | Name | Description |
|---|---|---|
| FileStacExtension | fileStacExtension | The file extension. |
| Stream | stream | The stream. |
| HashType | hashType | Type of the hash. |
| MultibaseEncoding | encoding | The encoding. |
Returns
| Type | Description |
|---|---|
| Task | No object or value is returned by this method when it completes. |