PropertyDictionary Class

Namespace:
Weavy.Core.Models
Assembly:
Weavy.Core.dll

An dictionary for storing properties (names and values).

public class PropertyDictionary : DynamicObject, IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IEnumerable, ICloneable
Inheritance:
System.Object → PropertyDictionary

Constructors

PropertyDictionary() Initializes a new instance of the PropertyDictionary class.
PropertyDictionary(IEnumerable) Initializes a new instance of the PropertyDictionary class with the specified property data.
PropertyDictionary(String) Initializes a new instance of the PropertyDictionary class with the specified json data.

Properties

Count Gets the number of elements contained in the System.Collections.Generic.ICollection`1.
IsReadOnly Gets a value indicating whether the System.Collections.Generic.ICollection`1 is read-only.
Item[String] Gets or sets the value associated with the specified property name.
Keys Gets an System.Collections.Generic.ICollection`1 containing the keys of the System.Collections.Generic.IDictionary`2.
Values Gets an System.Collections.Generic.ICollection`1 containing the values in the System.Collections.Generic.IDictionary`2.

Methods

Add(KeyValuePair) Adds the specified key and value to the dictionary.
Add(string, object) Adds the specified key and value to the dictionary.
Clear() Removes all items from the System.Collections.Generic.ICollection`1.
Clone() Create a deep copy of the current object.
Contains(KeyValuePair) Determines whether the System.Collections.Generic.ICollection`1 contains a specific value.
ContainsKey(string) Determines whether the System.Collections.Generic.IDictionary`2 contains an element with the specified key.
CopyTo(KeyValuePair[], int) Copies the elements of the System.Collections.Generic.ICollection`1 to an System.Array, starting at a particular System.Array index.
Get(string) Gets the value associated with the specified key.
GetDynamicMemberNames() Returns the enumeration of all dynamic member names.
GetEnumerator() Returns an enumerator that iterates through the collection.
Remove(KeyValuePair) Removes the first occurrence of a specific object from the System.Collections.Generic.ICollection`1.
Remove(string) Removes the element with the specified key from the System.Collections.Generic.IDictionary`2.
ToJson() Returns a json string that represents the dictionary.
ToString() Returns a string that represents the dictionary.
TryGetMember(GetMemberBinder, out Object) Gets the value of a property.
TryGetValue(string, out Object) Gets the value associated with the specified key.
TrySetMember(SetMemberBinder, object) Sets the value of a property.

Extension Methods

IsNullOrDefault(T) Gets a value indicating if the specified value has the default value of the generic type.
Serialize(object) Serializes an object, or graph of connected objects, to a byte array.
SerializeToJson(object, Formatting?, JsonSerializerSettings) Serializes an object, or graph of connected objects, to a json string.
IsValid(object) Determines whether the specified object is valid by evaluating each ValidationAttribute instance that is attached to the object type.