Class ApkAssetProvider
StreamAssetProvider implementation for the Android platform
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Fusee.Base.Imp.Android
Assembly: Fusee.Base.Imp.Android.dll
Syntax
public class ApkAssetProvider : StreamAssetProvider, IAssetProvider
Constructors
ApkAssetProvider(Context)
Initializes a new instance of the ApkAssetProvider class.
Declaration
public ApkAssetProvider(Context androidContext)
Parameters
Type | Name | Description |
---|---|---|
Android.Content.Context | androidContext | The android context. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
Methods
CheckExists(String)
Checks the existence of the identified asset.
Declaration
protected override bool CheckExists(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The asset identifier. |
Returns
Type | Description |
---|---|
System.Boolean | true if the asset exists. |
Overrides
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
CheckExistsAsync(String)
Checks the existence of the identified asset
Declaration
protected override Task<bool> CheckExistsAsync(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The asset identifier. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | true if the asset exists. |
Overrides
GetStream(String)
Creates a stream for the asset identified by id using System.IO.FileStream
Declaration
protected override Stream GetStream(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The asset identifier. |
Returns
Type | Description |
---|---|
System.IO.Stream | A valid stream for reading if the asset ca be retrieved. null otherwise. |
Overrides
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
GetStreamAsync(String)
Creates a stream for the asset identified by id using System.IO.FileStream
Declaration
protected override async Task<Stream> GetStreamAsync(string id)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The asset identifier. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.IO.Stream> | A valid stream for reading if the asset ca be retrieved. null otherwise. |
Overrides
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |