Class DataPropertyCollection
Represents a serializable collection of name/value properties.
Implements
Inherited Members
Namespace: Nevatech.Vsb.Repository.Entities
Assembly: Nevatech.Vsb.Repository.dll
Syntax
[CollectionDataContract(Namespace = "http://schemas.nevatech.com/sentinet/2011/02")]
public sealed class DataPropertyCollection : Collection<DataProperty>, IList<DataProperty>, ICollection<DataProperty>, IList, ICollection, IReadOnlyList<DataProperty>, IReadOnlyCollection<DataProperty>, IEnumerable<DataProperty>, IEnumerable
Constructors
DataPropertyCollection()
Initializes an empty instance.
Declaration
public DataPropertyCollection()
DataPropertyCollection(IDictionary<string, object>)
Initializes a new instance and populates if from the provided dictionary.
Declaration
public DataPropertyCollection(IDictionary<string, object> properties)
Parameters
| Type | Name | Description |
|---|---|---|
| IDictionary<string, object> | properties | Dictionary to be initialized from. |
Methods
Add(string, object)
Adds new property to provided collection.
Declaration
public void Add(string name, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Property name. |
| object | value | Property value. |
Deserialize(string)
Deserializes collection of properties from the provided XML string.
Declaration
[SuppressMessage("Microsoft.Usage", "CA2202:Do not dispose objects multiple times")]
public static DataPropertyCollection Deserialize(string value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | value | XML string representing a serialized collection of properties. |
Returns
| Type | Description |
|---|---|
| DataPropertyCollection | Collection of properties deserialized from the provided XML string. |
Serialize()
Serializes collection to an XML string.
Declaration
public string Serialize()
Returns
| Type | Description |
|---|---|
| string | XML string representing this collection. |