Skip to main content

Interface IDataStoreAccessor

Provides access to a data store managed by a storage backend. This DataStore is a key-value store that can store data in various formats.

Namespace: Workspace.XBR.Xperiflow.Routines.Io

Assembly: Xperiflow.dll

Declaration
public interface IDataStoreAccessor

Properties

RootDir

Declaration
string RootDir { get; }

Methods

Delete(string)

Delete a key and all of its data and metadata.

Declaration
void Delete(string key)
Parameters
TypeNameDescription
System.StringkeyThe lookup key associated with the data.

WriteDataTable(DataTable)

Writes a DataTable to the store. The table name is used as the key.

Declaration
void WriteDataTable(DataTable dt)
Parameters
TypeNameDescription
System.Data.DataTabledtThe DataTable to write. The DataTable.TableName is used as the key.

WriteDataTable(string, DataTable)

Writes a DataTable to the store.

Declaration
void WriteDataTable(string key, DataTable dt)
Parameters
TypeNameDescription
System.StringkeyThe lookup key to associate with the data.
System.Data.DataTabledtThe DataTable to write.

ReadDataTable(string)

Retrieves a DataTable from the store that is associated with the key. The table name is used as the key.

Declaration
DataTable ReadDataTable(string key)
Returns

System.Data.DataTable

The DataTable associated with the key.

Parameters
TypeNameDescription
System.StringkeyThe lookup key associated with the data.

WriteText(string, string)

Writes text to the store.

Declaration
void WriteText(string key, string text)
Parameters
TypeNameDescription
System.StringkeyThe lookup key to associate with the data.
System.StringtextThe string data to write.

ReadText(string)

Reads text from the store that is associated with the key.

Declaration
string ReadText(string key)
Returns

System.String

The string data associated with the key.

Parameters
TypeNameDescription
System.StringkeyThe lookup key associated with the data.

WriteKeyValuePairs(string, Dictionary<string, string>)

Writes a dictionary of key value pairs to the store.

Declaration
void WriteKeyValuePairs(string key, Dictionary<string, string> keyValuePairs)
Parameters
TypeNameDescription
System.StringkeyThe lookup key to associate with the data.
System.Collections.Generic.Dictionary<System.String,System.String>keyValuePairsThe key value pairs to write.

WriteKeyValuePairs(string, IEnumerable<KeyValuePair<string, string>>)

Writes an enumerable of key value pairs to the store.

Declaration
void WriteKeyValuePairs(string key, IEnumerable<KeyValuePair<string, string>> keyValuePairs)
Parameters
TypeNameDescription
System.StringkeyThe lookup key to associate with the data.
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair{System.String,System.String}>keyValuePairsThe key value pairs to write.

ReadKeyValuePairs(string)

Reads a dictionary of key value pairs from the store that is associated with the key.

Declaration
Dictionary<string, string> ReadKeyValuePairs(string key)
Returns

System.Collections.Generic.Dictionary<System.String,System.String>

The key value pairs associated with the key.

Parameters
TypeNameDescription
System.StringkeyThe lookup key associated with the data.

ReadKeyValuePairsAsEnumerable(string)

Reads an enumerable of key value pairs from the store that is associated with the key.

Declaration
IEnumerable<KeyValuePair<string, string>> ReadKeyValuePairsAsEnumerable(string key)
Returns

System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair{System.String,System.String}>

The key value pairs associated with the key.

Parameters
TypeNameDescription
System.StringkeyThe lookup key associated with the data.

WriteJson(string, string)

Writes a json string to the store.

Declaration
void WriteJson(string key, string json)
Parameters
TypeNameDescription
System.StringkeyThe lookup key to associate with the data.
System.StringjsonThe json string to write.

WriteJson(string, JObject)

Writes a json object to the store.

Declaration
void WriteJson(string key, JObject json)
Parameters
TypeNameDescription
System.StringkeyThe lookup key to associate with the data.
Newtonsoft.Json.Linq.JObjectjsonThe json object to write.

WriteJson(string, JArray)

Writes a json array to the store.

Declaration
void WriteJson(string key, JArray jArray)
Parameters
TypeNameDescription
System.StringkeyThe lookup key to associate with the data.
Newtonsoft.Json.Linq.JArrayjArrayThe json array to write.

WriteJson<T>(string, T)

Declaration
void WriteJson<T>(string key, T obj)
Parameters
TypeName
System.Stringkey
<T>obj
Type Parameters
  • T

ReadJsonAsString(string)

Reads a json string from the store that is associated with the key.

Declaration
string ReadJsonAsString(string key)
Returns

System.String

The json data associated with the key.

Parameters
TypeNameDescription
System.StringkeyThe lookup key associated with the data.

ReadJsonAsArray(string)

Reads a json array from the store that is associated with the key.

Declaration
JArray ReadJsonAsArray(string key)
Returns

Newtonsoft.Json.Linq.JArray

The json array associated with the key.

Parameters
TypeNameDescription
System.StringkeyThe lookup key associated with the data.

ReadJsonAsJObject(string)

Reads a json object from the store that is associated with the key.

Declaration
JObject ReadJsonAsJObject(string key)
Returns

Newtonsoft.Json.Linq.JObject

The json object associated with the key.

Parameters
TypeNameDescription
System.StringkeyThe lookup key associated with the data.

ReadJsonAsObject<T>(string)

Declaration
T? ReadJsonAsObject<T>(string key)
Returns

<T>

Parameters
TypeName
System.Stringkey
Type Parameters
  • T

Was this page helpful?