Class StorageExtensions
Inheritance
System.Object
StorageExtensions
Assembly: Eco.Core.dll
Syntax
public static class StorageExtensions : Object
Methods
Modify<T>(T, Action<T>)
Perform storage modification. It ensures it won't be modified or saved in another thread to prevent concurrency issues.
Declaration
public static void Modify<T>(this T storage, Action<T> action)
where T : IStorage
Parameters
Type |
Name |
Description |
T |
storage |
|
System.Action<T> |
action |
|
Type Parameters
Modify<T, TResult>(T, Func<T, TResult>)
Perform storage modification (version with return value). It ensures it won't be modified or saved in another thread to prevent concurrency issues.
Declaration
public static TResult Modify<T, TResult>(this T storage, Func<T, TResult> action)
where T : IStorage
Parameters
Type |
Name |
Description |
T |
storage |
|
System.Func<T, TResult> |
action |
|
Returns
Type Parameters
Name |
Description |
T |
|
TResult |
|
SaveAll(IStorage)
Declaration
public static void SaveAll(this IStorage storage)
Parameters