diff options
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> |
