Show / Hide Table of Contents

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
Namespace: Eco.Core.Serialization
Assembly: Eco.Core.dll
Syntax
public sealed class ExclusiveAccess : Object, IDisposable

Constructors

ExclusiveAccess(DataStore)

Declaration
public ExclusiveAccess(DataStore dataStore)
Parameters
Type Name Description
DataStore dataStore

Fields

DataStore

Declaration
public readonly DataStore DataStore
Field Value
Type Description
DataStore

Methods

Dispose()

Declaration
public void Dispose()

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
Name Description
T

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
Name Description
T

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
Name Description
T

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

PropertyChanges.FirePropertyChanged(Object, String)
PropertyChanges.FirePropertyChanged(Object, String, Object, Object)
PropertyChanges.FirePropertyChanged(Object, MemberChangedBeforeAfterEventArgs)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾