PropertyValueBag Class

Serializable bag of typed properties. "Simple" values, except enums, are strongly-typed; others are converted to string by invoking ToString through reflection. NOT thread-safe. This is the main extensibility point: derive from this class to store more structured data rather than putting bits into the dictionary. Use RegisterKnownType(Type) to support additional serializable types in the data dictionary.

Definition

Namespace: Quine.Schemas.Core.Eventing
Assembly: Quine.Schemas.Core (in Quine.Schemas.Core.dll) Version: 1.0.0+0ea0706914ee4edf2b0ed66bec3ab4d062a43b68
C#
[DataContractAttribute(Namespace = "http://schemas.quine.no/core/v3_0.xsd")]
[KnownTypeAttribute("GetKnownTypes")]
public abstract class PropertyValueBag
Inheritance
Object    PropertyValueBag
Derived

Constructors

PropertyValueBagInitializes a new instance of the PropertyValueBag class

Properties

Data Collection of key-value pairs. The property never returns null, but data is allocated only on first access.
HasData Used to check whether data dictionary is present without allocating it.

Methods

Add Adds a value under key to Data. If either the key or the value is null, nothing is added to the data dictionary.
AddMembers(Object, FuncMemberInfo, Boolean) Adds public instance data members from o to Data. For compactness, null values are omitted.
AddMembers(Object, Int32) Convenience overload for the most common use of AddMembers(Object, FuncMemberInfo, Boolean): adding all of public fields and/or properties to the bag.
RegisterKnownType Schema extension point: all additional derived classes and object types used as values in Data dictionary must be registered.

Fields

IncludeFields Flag to AddMembers(Object, Int32) to include public fields.
IncludeProperties Flag to AddMembers(Object, Int32) to include public properties.

See Also