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
public interface IDataStoreAccessor
Properties
RootDir
string RootDir { get; }
Methods
Delete(string)
Delete a key and all of its data and metadata.
void Delete(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The lookup key associated with the data. |
WriteDataTable(DataTable)
Writes a DataTable to the store. The table name is used as the key.
void WriteDataTable(DataTable dt)
Parameters
Type | Name | Description |
---|---|---|
System.Data.DataTable | dt | The DataTable to write. The DataTable.TableName is used as the key. |
WriteDataTable(string, DataTable)
Writes a DataTable to the store.
void WriteDataTable(string key, DataTable dt)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The lookup key to associate with the data. |
System.Data.DataTable | dt | The 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.
DataTable ReadDataTable(string key)
Returns
System.Data.DataTable
The DataTable associated with the key.
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The lookup key associated with the data. |
WriteText(string, string)
Writes text to the store.
void WriteText(string key, string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The lookup key to associate with the data. |
System.String | text | The string data to write. |
ReadText(string)
Reads text from the store that is associated with the key.
string ReadText(string key)
Returns
System.String
The string data associated with the key.
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The lookup key associated with the data. |
WriteKeyValuePairs(string, Dictionary<string, string>)
Writes a dictionary of key value pairs to the store.
void WriteKeyValuePairs(string key, Dictionary<string, string> keyValuePairs)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The lookup key to associate with the data. |
System.Collections.Generic.Dictionary<System.String,System.String> | keyValuePairs | The key value pairs to write. |
WriteKeyValuePairs(string, IEnumerable<KeyValuePair<string, string>>)
Writes an enumerable of key value pairs to the store.
void WriteKeyValuePairs(string key, IEnumerable<KeyValuePair<string, string>> keyValuePairs)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The lookup key to associate with the data. |
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair{System.String,System.String}> | keyValuePairs | The key value pairs to write. |
ReadKeyValuePairs(string)
Reads a dictionary of key value pairs from the store that is associated with the key.
Dictionary<string, string> ReadKeyValuePairs(string key)
Returns
System.Collections.Generic.Dictionary<System.String,System.String>
The key value pairs associated with the key.
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The lookup key associated with the data. |
ReadKeyValuePairsAsEnumerable(string)
Reads an enumerable of key value pairs from the store that is associated with the key.
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
Type | Name | Description |
---|---|---|
System.String | key | The lookup key associated with the data. |
WriteJson(string, string)
Writes a json string to the store.
void WriteJson(string key, string json)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The lookup key to associate with the data. |
System.String | json | The json string to write. |
WriteJson(string, JObject)
Writes a json object to the store.
void WriteJson(string key, JObject json)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The lookup key to associate with the data. |
Newtonsoft.Json.Linq.JObject | json | The json object to write. |
WriteJson(string, JArray)
Writes a json array to the store.
void WriteJson(string key, JArray jArray)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The lookup key to associate with the data. |
Newtonsoft.Json.Linq.JArray | jArray | The json array to write. |
WriteJson<T>(string, T)
void WriteJson<T>(string key, T obj)
Parameters
Type | Name |
---|---|
System.String | key |
<T> | obj |
Type Parameters
T
ReadJsonAsString(string)
Reads a json string from the store that is associated with the key.
string ReadJsonAsString(string key)
Returns
System.String
The json data associated with the key.
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The lookup key associated with the data. |
ReadJsonAsArray(string)
Reads a json array from the store that is associated with the key.
JArray ReadJsonAsArray(string key)
Returns
Newtonsoft.Json.Linq.JArray
The json array associated with the key.
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The lookup key associated with the data. |
ReadJsonAsJObject(string)
Reads a json object from the store that is associated with the key.
JObject ReadJsonAsJObject(string key)
Returns
Newtonsoft.Json.Linq.JObject
The json object associated with the key.
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The lookup key associated with the data. |
ReadJsonAsObject<T>(string)
T? ReadJsonAsObject<T>(string key)
Returns
<T>
Parameters
Type | Name |
---|---|
System.String | key |
Type Parameters
T