Class MutableDictionaryObject
A class representing a writeable string to object dictionary
Implements
Inherited Members
Namespace: Couchbase.Lite
Assembly: Couchbase.Lite.dll
Syntax
public sealed class MutableDictionaryObject : DictionaryObject, IMutableDictionary, IDictionaryObject, IDictionaryFragment, IEnumerable<KeyValuePair<string, object>>, IEnumerable, IMutableDictionaryFragment
Constructors
| Improve this Doc View SourceMutableDictionaryObject()
Default Constructor
Declaration
public MutableDictionaryObject()
MutableDictionaryObject(IDictionary<String, Object>)
Creates a dictionary given the initial set of keys and values from an existing dictionary
Declaration
public MutableDictionaryObject(IDictionary<string, object> dict)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> | dict | The dictionary to copy the keys and values from |
Properties
| Improve this Doc View SourceItem[String]
Gets the fragment value for the given key in this dictionary
Declaration
public IMutableFragment this[string key] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key whose value to retrieve |
Property Value
Type | Description |
---|---|
IMutableFragment | The fragment representing the value at the given key |
Methods
| Improve this Doc View SourceGetArray(String)
Gets the value of a given key as an IMutableArray
Declaration
public MutableArrayObject GetArray(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key to check the value for |
Returns
Type | Description |
---|---|
MutableArrayObject | The contained value, or |
GetDictionary(String)
Gets the value of a given key as a dictionary
Declaration
public MutableDictionaryObject GetDictionary(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key to check the value for |
Returns
Type | Description |
---|---|
MutableDictionaryObject | The contained value, or |
Remove(String)
Removes the given key from this dictionary
Declaration
public IMutableDictionary Remove(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key to remove |
Returns
Type | Description |
---|---|
IMutableDictionary | Itself for further processing |
SetArray(String, ArrayObject)
Sets the given key to the given value
Declaration
public IMutableDictionary SetArray(string key, ArrayObject value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key to set |
ArrayObject | value | The value to set |
Returns
Type | Description |
---|---|
IMutableDictionary | Itself for further processing |
SetBlob(String, Blob)
Sets the given key to the given value
Declaration
public IMutableDictionary SetBlob(string key, Blob value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key to set |
Blob | value | The value to set |
Returns
Type | Description |
---|---|
IMutableDictionary | Itself for further processing |
SetBoolean(String, Boolean)
Sets the given key to the given value
Declaration
public IMutableDictionary SetBoolean(string key, bool value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key to set |
System.Boolean | value | The value to set |
Returns
Type | Description |
---|---|
IMutableDictionary | Itself for further processing |
SetData(IDictionary<String, Object>)
Replaces the contents of this dictionary with the contents of the given one
Declaration
public IMutableDictionary SetData(IDictionary<string, object> dictionary)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<System.String, System.Object> | dictionary | The dictionary to replace the current contents with |
Returns
Type | Description |
---|---|
IMutableDictionary | Itself for further processing |
SetDate(String, DateTimeOffset)
Sets the given key to the given value
Declaration
public IMutableDictionary SetDate(string key, DateTimeOffset value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key to set |
System.DateTimeOffset | value | The value to set |
Returns
Type | Description |
---|---|
IMutableDictionary | Itself for further processing |
SetDictionary(String, DictionaryObject)
Sets the given key to the given value
Declaration
public IMutableDictionary SetDictionary(string key, DictionaryObject value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key to set |
DictionaryObject | value | The value to set |
Returns
Type | Description |
---|---|
IMutableDictionary | Itself for further processing |
SetDouble(String, Double)
Sets the given key to the given value
Declaration
public IMutableDictionary SetDouble(string key, double value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key to set |
System.Double | value | The value to set |
Returns
Type | Description |
---|---|
IMutableDictionary | Itself for further processing |
SetFloat(String, Single)
Sets the given key to the given value
Declaration
public IMutableDictionary SetFloat(string key, float value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key to set |
System.Single | value | The value to set |
Returns
Type | Description |
---|---|
IMutableDictionary | Itself for further processing |
SetInt(String, Int32)
Sets the given key to the given value
Declaration
public IMutableDictionary SetInt(string key, int value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key to set |
System.Int32 | value | The value to set |
Returns
Type | Description |
---|---|
IMutableDictionary | Itself for further processing |
SetLong(String, Int64)
Sets the given key to the given value
Declaration
public IMutableDictionary SetLong(string key, long value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key to set |
System.Int64 | value | The value to set |
Returns
Type | Description |
---|---|
IMutableDictionary | Itself for further processing |
SetString(String, String)
Sets the given key to the given value
Declaration
public IMutableDictionary SetString(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key to set |
System.String | value | The value to set |
Returns
Type | Description |
---|---|
IMutableDictionary | Itself for further processing |
SetValue(String, Object)
Sets the given key to the given value
Declaration
public IMutableDictionary SetValue(string key, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key to set |
System.Object | value | The value to set |
Returns
Type | Description |
---|---|
IMutableDictionary | Itself for further processing |