Class PropertyBagObjectsExtensions
Class with extension methods for PropertyBag
Inheritance
Inherited Members
Namespace: EPiServer.Data.Dynamic
Assembly: EPiServer.Data.dll
Version: 8.11.0Syntax
public static class PropertyBagObjectsExtensionsMethods
ToPropertyBag(Object)
Create a PropertyBag instance and populates it with its properties The algorith for extracting properties is as follows: 1) Property must a have a getter and setter 2a) Getter must be public OR 2b) The class must be marked either with the System.Runtime.Serialization.DataContractAttribute or EPiServerDataContractAttribute and the property must be marked either with the System.Runtime.Serialization.DataMemberAttribute or EPiServerDataMemberAttribute
Declaration
public static PropertyBag ToPropertyBag(this object value)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | value | The System.Object to convert | 
Returns
| Type | Description | 
|---|---|
| PropertyBag | A new PropertyBag instance | 
ToPropertyBag(Object, IEnumerable<String>)
Create a PropertyBag instance and populates it with its properties
Declaration
public static PropertyBag ToPropertyBag(this object value, IEnumerable<string> propertyNames)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | value | The System.Object to convert | 
| System.Collections.Generic.IEnumerable<System.String> | propertyNames | The names of the properties to extract a place into the property bag | 
Returns
| Type | Description | 
|---|---|
| PropertyBag | A new PropertyBag instance | 
