Method Load
Load<TSerializableData>(string, Action<TSerializableData>, Action<Exception>)
Asynchronously loads data from the persistence layer. Deserialized data, when loaded, are passed as second argument of the given onFinish Action. The generic param will be provided by the serializer underneath and need to implement ISerializableData
Declaration
public override void Load<TSerializableData>(string identifier, Action<TSerializableData> onLoadCompleted = null, Action<Exception> onLoadFailed = null) where TSerializableData : ISerializableData
Parameters
Type | Name | Description |
---|---|---|
string | identifier | Identifier of the persistence entry (filename, url, ...) |
Action<TSerializableData> | onLoadCompleted | Called when the loading is completed with success |
Action<Exception> | onLoadFailed | Called with a detailed exception when the loading failed |
Type Parameters
Name | Description |
---|---|
TSerializableData | The type of serializable data to load. |