Table of Contents

Class ThreadSafeDataLayer

Namespace
DevExpress.Xpo
Assembly
DevExpress.Xpo.v24.1.dll

Implements a data layer that allows multiple threads to access data in a data store at the same time.

public class ThreadSafeDataLayer : BaseDataLayer, ICommandChannel, IDataLayerAsync, IDataLayer, IDisposable, IDataLayerProvider, IXPDictionaryProvider, ICommandChannelAsync
Inheritance
ThreadSafeDataLayer
Implements
ICommandChannel
ICommandChannelAsync
Inherited Members

Constructors

ThreadSafeDataLayer(IDataStore)

Initializes a new instance of the ThreadSafeDataLayer class with specified settings.

public ThreadSafeDataLayer(IDataStore provider)

Parameters

provider IDataStore

ThreadSafeDataLayer(IDataStore, IEnumerable<Assembly>)

Initializes a new instance of the ThreadSafeDataLayer class with specified settings.

public ThreadSafeDataLayer(IDataStore provider, IEnumerable<Assembly> assemblies)

Parameters

provider IDataStore
assemblies IEnumerable<Assembly>

ThreadSafeDataLayer(IDataStore, IEnumerable<Type>)

Initializes a new instance of the ThreadSafeDataLayer class with specified settings.

public ThreadSafeDataLayer(IDataStore provider, IEnumerable<Type> types)

Parameters

provider IDataStore
types IEnumerable<Type>

ThreadSafeDataLayer(IDataStore, params Assembly[])

Initializes a new instance of the ThreadSafeDataLayer class with specified settings.

public ThreadSafeDataLayer(IDataStore provider, params Assembly[] assemblies)

Parameters

provider IDataStore
assemblies Assembly[]

ThreadSafeDataLayer(IDataStore, params Type[])

Initializes a new instance of the ThreadSafeDataLayer class with specified settings.

public ThreadSafeDataLayer(IDataStore provider, params Type[] types)

Parameters

provider IDataStore
types Type[]

ThreadSafeDataLayer(XPDictionary, IDataStore)

Initializes a new instance of the ThreadSafeDataLayer class with specified settings.

public ThreadSafeDataLayer(XPDictionary dictionary, IDataStore provider)

Parameters

dictionary XPDictionary
provider IDataStore

ThreadSafeDataLayer(XPDictionary, IDataStore, Action<XPDictionary>)

Initializes a new instance of the ThreadSafeDataLayer class with specified settings.

public ThreadSafeDataLayer(XPDictionary dictionary, IDataStore provider, Action<XPDictionary> dictionaryInit)

Parameters

dictionary XPDictionary
provider IDataStore
dictionaryInit Action<XPDictionary>

ThreadSafeDataLayer(XPDictionary, IDataStore, IEnumerable<Assembly>)

Initializes a new instance of the ThreadSafeDataLayer class with specified settings.

public ThreadSafeDataLayer(XPDictionary dictionary, IDataStore provider, IEnumerable<Assembly> assemblies)

Parameters

dictionary XPDictionary
provider IDataStore
assemblies IEnumerable<Assembly>

ThreadSafeDataLayer(XPDictionary, IDataStore, IEnumerable<Type>)

Initializes a new instance of the ThreadSafeDataLayer class with specified settings.

public ThreadSafeDataLayer(XPDictionary dictionary, IDataStore provider, IEnumerable<Type> types)

Parameters

dictionary XPDictionary
provider IDataStore
types IEnumerable<Type>

ThreadSafeDataLayer(XPDictionary, IDataStore, params Assembly[])

Initializes a new instance of the ThreadSafeDataLayer class.

public ThreadSafeDataLayer(XPDictionary dictionary, IDataStore provider, params Assembly[] assemblies)

Parameters

dictionary XPDictionary

An XPDictionary object that specifies the metadata.

provider IDataStore

A DevExpress.Xpo.DB.IDataStore object which implements data-specific functionality.

assemblies Assembly[]

An array of persistent object assemblies.

ThreadSafeDataLayer(XPDictionary, IDataStore, params Type[])

Initializes a new instance of the ThreadSafeDataLayer class with specified settings.

public ThreadSafeDataLayer(XPDictionary dictionary, IDataStore provider, params Type[] types)

Parameters

dictionary XPDictionary
provider IDataStore
types Type[]

Properties

Connection

This property always returns null (Nothing in Visual Basic).

[Browsable(false)]
public override IDbConnection Connection { get; }

Property Value

IDbConnection

Always null (Nothing in Visual Basic).

Methods

BeforeClassInfoSubscribe()

protected override void BeforeClassInfoSubscribe()

CreateCommand()

Returns null because ThreadSafeDataLayer does not allow commands to be created manually.

public override IDbCommand CreateCommand()

Returns

IDbCommand

Always null (Nothing in Visual Basic).

Do(string, object)

protected override object Do(string command, object args)

Parameters

command string
args object

Returns

object

DoAsync(string, object, CancellationToken)

protected override Task<object> DoAsync(string command, object args, CancellationToken cancellationToken = default)

Parameters

command string
args object
cancellationToken CancellationToken

Returns

Task<object>

InitializeDictionary(XPDictionary)

public static void InitializeDictionary(XPDictionary dictionary)

Parameters

dictionary XPDictionary

InitializeDictionary(XPDictionary, IEnumerable<Assembly>)

public static void InitializeDictionary(XPDictionary dictionary, IEnumerable<Assembly> assemblies)

Parameters

dictionary XPDictionary
assemblies IEnumerable<Assembly>

InitializeDictionary(XPDictionary, IEnumerable<Type>)

public static void InitializeDictionary(XPDictionary dictionary, IEnumerable<Type> types)

Parameters

dictionary XPDictionary
types IEnumerable<Type>

InitializeDictionary(XPDictionary, params Assembly[])

public static void InitializeDictionary(XPDictionary dictionary, params Assembly[] assemblies)

Parameters

dictionary XPDictionary
assemblies Assembly[]

InitializeDictionary(XPDictionary, params Type[])

public static void InitializeDictionary(XPDictionary dictionary, params Type[] types)

Parameters

dictionary XPDictionary
types Type[]

ModifyData(params ModificationStatement[])

Updates data in a data store using the specified modification statements.

public override ModificationResult ModifyData(params ModificationStatement[] dmlStatements)

Parameters

dmlStatements ModificationStatement[]

An array of data modification statements.

Returns

ModificationResult

The result of the data modifications.

ModifyDataAsync(CancellationToken, params ModificationStatement[])

public override Task<ModificationResult> ModifyDataAsync(CancellationToken cancellationToken, params ModificationStatement[] dmlStatements)

Parameters

cancellationToken CancellationToken
dmlStatements ModificationStatement[]

Returns

Task<ModificationResult>

OnClassInfoChanged(object, ClassInfoEventArgs)

protected override void OnClassInfoChanged(object sender, ClassInfoEventArgs e)

Parameters

sender object
e ClassInfoEventArgs

PrepareDataStore(IDataStore)

public static void PrepareDataStore(IDataStore dataStore)

Parameters

dataStore IDataStore

PrepareDataStore(IDataStore, XPDictionary)

public static void PrepareDataStore(IDataStore dataStore, XPDictionary dictionary)

Parameters

dataStore IDataStore
dictionary XPDictionary

PrepareDataStore(IDataStore, XPDictionary, params XPClassInfo[])

public static void PrepareDataStore(IDataStore dataStore, XPDictionary dictionary, params XPClassInfo[] types)

Parameters

dataStore IDataStore
dictionary XPDictionary
types XPClassInfo[]

PrepareDataStore(IDataStore, XPDictionary, IEnumerable<XPClassInfo>)

public static void PrepareDataStore(IDataStore dataStore, XPDictionary dictionary, IEnumerable<XPClassInfo> types)

Parameters

dataStore IDataStore
dictionary XPDictionary
types IEnumerable<XPClassInfo>

PrepareDataStore(IDataStore, XPDictionary, IEnumerable<Assembly>)

public static void PrepareDataStore(IDataStore dataStore, XPDictionary dictionary, IEnumerable<Assembly> assemblies)

Parameters

dataStore IDataStore
dictionary XPDictionary
assemblies IEnumerable<Assembly>

PrepareDataStore(IDataStore, XPDictionary, IEnumerable<Type>)

public static void PrepareDataStore(IDataStore dataStore, XPDictionary dictionary, IEnumerable<Type> types)

Parameters

dataStore IDataStore
dictionary XPDictionary
types IEnumerable<Type>

PrepareDataStore(IDataStore, XPDictionary, params Assembly[])

public static void PrepareDataStore(IDataStore dataStore, XPDictionary dictionary, params Assembly[] assemblies)

Parameters

dataStore IDataStore
dictionary XPDictionary
assemblies Assembly[]

PrepareDataStore(IDataStore, XPDictionary, params Type[])

public static void PrepareDataStore(IDataStore dataStore, XPDictionary dictionary, params Type[] types)

Parameters

dataStore IDataStore
dictionary XPDictionary
types Type[]

PrepareDataStore(IDataStore, IEnumerable<Assembly>)

public static void PrepareDataStore(IDataStore dataStore, IEnumerable<Assembly> assemblies)

Parameters

dataStore IDataStore
assemblies IEnumerable<Assembly>

PrepareDataStore(IDataStore, IEnumerable<Type>)

public static void PrepareDataStore(IDataStore dataStore, IEnumerable<Type> types)

Parameters

dataStore IDataStore
types IEnumerable<Type>

PrepareDataStore(IDataStore, params Assembly[])

public static void PrepareDataStore(IDataStore dataStore, params Assembly[] assemblies)

Parameters

dataStore IDataStore
assemblies Assembly[]

PrepareDataStore(IDataStore, params Type[])

public static void PrepareDataStore(IDataStore dataStore, params Type[] types)

Parameters

dataStore IDataStore
types Type[]

SelectData(params SelectStatement[])

Fetches data from a data store using the specified query statements.

public override SelectedData SelectData(params SelectStatement[] selects)

Parameters

selects SelectStatement[]

An array of statements to obtain data from the data store.

Returns

SelectedData

The data retrieved from the data store.

SelectDataAsync(CancellationToken, params SelectStatement[])

public override Task<SelectedData> SelectDataAsync(CancellationToken cancellationToken, params SelectStatement[] selects)

Parameters

cancellationToken CancellationToken
selects SelectStatement[]

Returns

Task<SelectedData>

UpdateSchema(bool, params XPClassInfo[])

Updates the storage schema according to the specified class descriptions.

public override UpdateSchemaResult UpdateSchema(bool doNotCreate, params XPClassInfo[] types)

Parameters

doNotCreate bool

true if the schema should not be created when the table that corresponds to the first item in the types array doesn’t exist in the storage.

types XPClassInfo[]

An array of XPClassInfo objects that specify object metadata for which schema should be created in the data store.

Returns

UpdateSchemaResult

A DevExpress.Xpo.DB.UpdateSchemaResult value that specifies the result of the update operation.

UpdateSchemaAsync(CancellationToken, bool, params XPClassInfo[])

Asynchronously updates the storage schema according to the specified class descriptions.

public override Task<UpdateSchemaResult> UpdateSchemaAsync(CancellationToken cancellationToken, bool doNotCreate, params XPClassInfo[] types)

Parameters

cancellationToken CancellationToken

A CancellationToken object that delivers a cancellation notice to the running operation.

doNotCreate bool

true if the schema should not be created when the table that corresponds to the first item in the types array doesn’t exist in the storage.

types XPClassInfo[]

An array of XPClassInfo objects that specify object metadata for which schema should be created in the data store.

Returns

Task<UpdateSchemaResult>

A Task<TResult> that returns an DevExpress.Xpo.DB.UpdateSchemaResult enumeration value which specifies the result of the update operation.