Class CompositeObject
Provides a way to store composite object content in inner Dictionary
Inheritance
System.Object
CompositeObject
Implements
System.Collections.Generic.IDictionary<System.String, System.Object>
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String, System.Object>>
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.Object>>
System.Collections.IEnumerable
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Terrasoft.Common
Assembly: Terrasoft.Common.dll
Syntax
public class CompositeObject : IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, ISerializableObject, ICompositeObjectValues, IEnumerable<KeyValuePair<string, object>>, IEnumerable, ICompositeObject
Constructors
CompositeObject()
Creates an empty instance of CompositeObject
Declaration
public CompositeObject()
CompositeObject(IDictionary<String, Object>)
Creates instance of CompositeObject and fills.
Declaration
public CompositeObject(IDictionary<string, object> source)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.IDictionary<System.String, System.Object> | source | Dictionary to fill this instance from. |
Properties
Count
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
IsReadOnly
Declaration
public bool IsReadOnly { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Item[String]
Declaration
public object this[string key] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | key |
Property Value
| Type | Description |
|---|---|
| System.Object |
Keys
Declaration
public ICollection<string> Keys { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.ICollection<System.String> |
Values
Declaration
public ICollection<object> Values { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.ICollection<System.Object> |
Methods
Add(KeyValuePair<String, Object>)
Declaration
public void Add(KeyValuePair<string, object> item)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.KeyValuePair<System.String, System.Object> | item |
Add(String, Object)
Declaration
public void Add(string key, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | key | |
| System.Object | value |
Clear()
Declaration
public void Clear()
Contains(KeyValuePair<String, Object>)
Declaration
public bool Contains(KeyValuePair<string, object> item)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.KeyValuePair<System.String, System.Object> | item |
Returns
| Type | Description |
|---|---|
| System.Boolean |
ContainsKey(String)
Declaration
public bool ContainsKey(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | key |
Returns
| Type | Description |
|---|---|
| System.Boolean |
CopyTo(KeyValuePair<String, Object>[], Int32)
Declaration
public void CopyTo(KeyValuePair<string, object>[] array, int arrayIndex)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.KeyValuePair<System.String, System.Object>[] | array | |
| System.Int32 | arrayIndex |
Deserialize(DataReader)
Deserializes own state using specified data reader.
Declaration
public void Deserialize(DataReader dataReader)
Parameters
| Type | Name | Description |
|---|---|---|
| DataReader | dataReader | The data reader. |
IsTypeSupported(Type)
Checks whether the type described by the type is supported or not.
Declaration
public static bool IsTypeSupported(Type type)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | type | Type to look for. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
|
Remove(KeyValuePair<String, Object>)
Declaration
public bool Remove(KeyValuePair<string, object> item)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.Generic.KeyValuePair<System.String, System.Object> | item |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Remove(String)
Declaration
public bool Remove(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | key |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Serialize(DataWriter)
Serializes own state using specified data writer.
Declaration
public void Serialize(DataWriter dataWriter)
Parameters
| Type | Name | Description |
|---|---|---|
| DataWriter | dataWriter | The data writer. |
TryGetValue(String, out Object)
Declaration
public bool TryGetValue(string key, out object value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | key | |
| System.Object | value |
Returns
| Type | Description |
|---|---|
| System.Boolean |
TryGetValue(String, Type, out Object)
Returns inner value by key.
Declaration
public bool TryGetValue(string key, Type valueType, out object value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | key | The key. |
| System.Type | valueType | Type of the value. |
| System.Object | value | Result value. |
Returns
| Type | Description |
|---|---|
| System.Boolean |
TryGetValue<TValueType>(String, out TValueType)
Declaration
public bool TryGetValue<TValueType>(string key, out TValueType value)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | key | |
| TValueType | value |
Returns
| Type | Description |
|---|---|
| System.Boolean |
Type Parameters
| Name | Description |
|---|---|
| TValueType |
Explicit Interface Implementations
IEnumerable<KeyValuePair<String, Object>>.GetEnumerator()
Declaration
IEnumerator<KeyValuePair<string, object>> IEnumerable<KeyValuePair<string, object>>.GetEnumerator()
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<System.String, System.Object>> |
IEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
| Type | Description |
|---|---|
| System.Collections.IEnumerator |
Implements
System.Collections.Generic.IDictionary<TKey, TValue>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable