Class DataStore.ExclusiveAccess
Class which should be used for exclusive access to DataStore.
May be obtained with WaitExclusiveAccess() or WaitExclusiveAccessAsync() to get it with exclusive access.
You can also create with ExclusiveAccess(DataStore) constructor (no obtained state) and then Eco.Core.Serialization.DataStore.ExclusiveAccess.Wait(System.Threading.CancellationToken) or Eco.Core.Serialization.DataStore.ExclusiveAccess.WaitAsync(System.Threading.CancellationToken).
Inheritance
System.Object
DataStore.ExclusiveAccess
Implements
System.IDisposable
Assembly: Eco.Core.dll
Syntax
public sealed class ExclusiveAccess : Object, IDisposable
Constructors
ExclusiveAccess(DataStore)
Declaration
public ExclusiveAccess(DataStore dataStore)
Parameters
Fields
DataStore
Declaration
public readonly DataStore DataStore
Field Value
Methods
Dispose()
Declaration
Finalize()
Declaration
protected override void Finalize()
Load<T>(String, Action<T>, Boolean)
Declaration
public void Load<T>(string folder, Action<T> onLoad, bool migrate = true)
where T : IStorage
Parameters
| Type |
Name |
Description |
| System.String |
folder |
|
| System.Action<T> |
onLoad |
|
| System.Boolean |
migrate |
|
Type Parameters
LoadAndRemove<T>(String, Action<T, String>)
Declaration
public void LoadAndRemove<T>(string folder, Action<T, string> onLoad)
Parameters
| Type |
Name |
Description |
| System.String |
folder |
|
| System.Action<T, System.String> |
onLoad |
|
Type Parameters
LoadAsync<T>(String, Action<T>)
Declaration
public void LoadAsync<T>(string folder, Action<T> onLoad)
where T : IStorage
Parameters
| Type |
Name |
Description |
| System.String |
folder |
|
| System.Action<T> |
onLoad |
|
Type Parameters
PurgeAsync(String)
Declaration
public Task PurgeAsync(string folder)
Parameters
| Type |
Name |
Description |
| System.String |
folder |
|
Returns
| Type |
Description |
| System.Threading.Tasks.Task |
|
SwitchToWriteMode()
Declaration
public void SwitchToWriteMode()
Implements
System.IDisposable
Extension Methods