From 8d2b13aaa70bc6a8f521df4eab165caf078c33fa Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Fri, 23 Oct 2020 03:13:09 +0300 Subject: DataStore Improvements. --- .../Tango.DataStore/IDataStoreCollection.cs | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'Software/Visual_Studio/Tango.DataStore/IDataStoreCollection.cs') 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. /// String Name { get; } + /// /// Upserts the specified key and value. /// /// The key. /// The value. void Put(String key, Object value); + /// /// Upserts the specified key and value of type T. /// @@ -28,6 +30,7 @@ namespace Tango.DataStore /// The key. /// The value. void Put(String key, T value); + /// /// Upserts the specified key and value. /// The value must be of the specified DataType. @@ -36,12 +39,22 @@ namespace Tango.DataStore /// The type. /// The value. void Put(String key, DataType type, Object value); + /// /// Gets the value by the specified key /// /// The key. /// Object Get(String key); + + /// + /// Gets the value by the specified key + /// + /// The key. + /// Will execute put when the key was not found. + /// + Object Get(String key, Object defaultValue); + /// /// Gets the value of type T by the specified key /// @@ -49,31 +62,54 @@ namespace Tango.DataStore /// The key. /// T Get(String key); + + /// + /// Gets the value of type T by the specified key + /// + /// + /// The key. + /// Will execute put when the key was not found. + /// + T Get(String key, T defaultValue); + /// /// Gets the full data store item by the specified key. /// /// The key. /// IDataStoreItem GetItem(String key); + + /// + /// Gets the full data store item by the specified key. + /// + /// The key. + /// Will execute put when the key was not found. + /// + IDataStoreItem GetItem(String key, Object defaultValue); + /// /// Gets all the data store items in the collection. /// /// List GetAll(); + /// /// Gets all the data store unsynchronized items in the collection. /// /// List GetUnsynchronized(); + /// /// Deleted an item by the specified key. /// /// The key. void Delete(String key); + /// /// Deletes all items in the collection. /// void DeleteAll(); + /// /// Returns the number of items in the collection. /// -- cgit v1.3.1