diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-10-23 03:13:09 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-10-23 03:13:09 +0300 |
| commit | 8d2b13aaa70bc6a8f521df4eab165caf078c33fa (patch) | |
| tree | 325567b00d55fa751da7492be067e7878b132e28 /Software/Visual_Studio/Tango.DataStore/IDataStoreCollection.cs | |
| parent | a79900d579ae9f624b35aa933784e4e0f0c65d03 (diff) | |
| download | Tango-8d2b13aaa70bc6a8f521df4eab165caf078c33fa.tar.gz Tango-8d2b13aaa70bc6a8f521df4eab165caf078c33fa.zip | |
DataStore Improvements.
Diffstat (limited to 'Software/Visual_Studio/Tango.DataStore/IDataStoreCollection.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.DataStore/IDataStoreCollection.cs | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.DataStore/IDataStoreCollection.cs b/Software/Visual_Studio/Tango.DataStore/IDataStoreCollection.cs index e73d02328..baca95c67 100644 --- a/Software/Visual_Studio/Tango.DataStore/IDataStoreCollection.cs +++ b/Software/Visual_Studio/Tango.DataStore/IDataStoreCollection.cs @@ -15,12 +15,14 @@ namespace Tango.DataStore /// Gets the collection name. /// </summary> String Name { get; } + /// <summary> /// Upserts the specified key and value. /// </summary> /// <param name="key">The key.</param> /// <param name="value">The value.</param> void Put(String key, Object value); + /// <summary> /// Upserts the specified key and value of type T. /// </summary> @@ -28,6 +30,7 @@ namespace Tango.DataStore /// <param name="key">The key.</param> /// <param name="value">The value.</param> void Put<T>(String key, T value); + /// <summary> /// Upserts the specified key and value. /// The value must be of the specified DataType. @@ -36,12 +39,22 @@ namespace Tango.DataStore /// <param name="type">The type.</param> /// <param name="value">The value.</param> void Put(String key, DataType type, Object value); + /// <summary> /// Gets the value by the specified key /// </summary> /// <param name="key">The key.</param> /// <returns></returns> Object Get(String key); + + /// <summary> + /// Gets the value by the specified key + /// </summary> + /// <param name="key">The key.</param> + /// <param name="defaultValue">Will execute put when the key was not found.</param> + /// <returns></returns> + Object Get(String key, Object defaultValue); + /// <summary> /// Gets the value of type T by the specified key /// </summary> @@ -49,31 +62,54 @@ namespace Tango.DataStore /// <param name="key">The key.</param> /// <returns></returns> T Get<T>(String key); + + /// <summary> + /// Gets the value of type T by the specified key + /// </summary> + /// <typeparam name="T"></typeparam> + /// <param name="key">The key.</param> + /// <param name="defaultValue">Will execute put when the key was not found.</param> + /// <returns></returns> + T Get<T>(String key, T defaultValue); + /// <summary> /// Gets the full data store item by the specified key. /// </summary> /// <param name="key">The key.</param> /// <returns></returns> IDataStoreItem GetItem(String key); + + /// <summary> + /// Gets the full data store item by the specified key. + /// </summary> + /// <param name="key">The key.</param> + /// <param name="defaultValue">Will execute put when the key was not found.</param> + /// <returns></returns> + IDataStoreItem GetItem(String key, Object defaultValue); + /// <summary> /// Gets all the data store items in the collection. /// </summary> /// <returns></returns> List<IDataStoreItem> GetAll(); + /// <summary> /// Gets all the data store unsynchronized items in the collection. /// </summary> /// <returns></returns> List<IDataStoreItem> GetUnsynchronized(); + /// <summary> /// Deleted an item by the specified key. /// </summary> /// <param name="key">The key.</param> void Delete(String key); + /// <summary> /// Deletes all items in the collection. /// </summary> void DeleteAll(); + /// <summary> /// Returns the number of items in the collection. /// </summary> |
