• DXC Service
  • Products
    • Episerver CMS
    • Episerver Commerce
    • Episerver Campaign
    • Episerver Find
    • Episerver Personalization
      • Advance
      • Perform
      • Insight
      • Reach
      • Personalized Find
    • Episerver Social API
    • Episerver apps & integrations
    • Ektron CMS
  • Documentation
    • Get started
      • DXC Service
      • CMS
      • Commerce
      • Campaign
      • Find
      • Personalization
      • Insight
      • Social API
      • Service API
    • Developer guides
      • DXC Service
      • CMS
      • Commerce
      • Campaign
      • Find
      • Advance
      • Perform
      • Reach
      • Personalized Find
      • Insight
      • Tracking
      • Profile Store
      • Content Delivery API
      • Social API
      • Service API
      • Forms
      • MA connectors
    • UI feature list
    • Technical overview
    • System requirements
    • Installation
    • User guide
    • APIs and libraries
      • CMS
      • Commerce
      • Campaign
      • Find
      • Social
      • REST APIs
    • Video tutorials
    • Releases
    • Upgrading
      • CMS
      • Commerce
      • Find
      • Forms
      • Service API
      • Personalization
  • Blogs
  • Forum
  • Support
  • EMVPs
  • Register
  • Log in
All Content Documentation Forum User Guide Support Help Center Blogs Articles Releases Bug List SDK Documents
People
Home / Documentation /
  • Framework reference
  • EPiServer.Data.Dynamic
  • PropertyBag
    • PropertyBag Methods
    • PropertyBag Properties

PropertyBag Class

Assembly: EPiServer.Data (in EPiServer.Data.dll) Version: 8.0.0

Syntax:

C#
[SerializableAttribute]
public class PropertyBag : IDictionary<string, Object>, 
	ICollection<KeyValuePair<string, Object>>, IEnumerable<KeyValuePair<string, Object>>, 
	IEnumerable, ISerializable, IDynamicData

A class used to save and load a collection a name/value pairs

Methods

Name Summary Status
Add(IDictionary(String, Object)) Adds the values in properties to the current object public
Add(String, Object) Adds an element with the provided key and value to the IDictionary<(Of <(<'TKey, TValue>)>)>. public
ApplyRange(T)(IEnumerable(T), ItemRange) Applies the specified range (start, end) and returns the items in the range together with the actual range (start, end, total). public, static
ApplyRange(T)(IEnumerable(T), ItemRange, Nullable(Int32)) Applies the specified range (start, end) and returns the items in the range together with the actual range (start, end, total), using a supplied total count which means that items don't have to be enumerated to get the count. public, static
Clear Removes all items from the ICollection<(Of <(<'T>)>)>. public
Contains Determines whether the ICollection<(Of <(<'T>)>)> contains a specific value. public
ContainsKey Determines whether the IDictionary<(Of <(<'TKey, TValue>)>)> contains an element with the specified key. public
GenerateTypeBag Generate a collection of String to Type from the properties held in the current object public
GetEnumerator Returns an enumerator that iterates through the collection. public
GetIdentity Extracts the identity from the object if it has one. public, static
GetObjectData public
GetOriginalType Gets the Type of the current object, ensuring that the eventual type that could be generated by a proxy interceptor is ignored. public, static
ICollection(KeyValuePair(String, Object)).Add Adds an item to the ICollection<(Of <(<'T>)>)>.
ICollection(KeyValuePair(String, Object)).CopyTo Copies the elements of the ICollection<(Of <(<'T>)>)> to an Array, starting at a particular Array index.
ICollection(KeyValuePair(String, Object)).Remove Removes the first occurrence of a specific object from the ICollection<(Of <(<'T>)>)>.
IEnumerable.GetEnumerator Returns an enumerator that iterates through a collection.
ItemAs(TObject) Returns an item from the dictionary as the type specified in the TObject parameter public, static
PropertyBag Constructor public
PropertyBag Constructor (SerializationInfo, StreamingContext) protected
Remove Removes the element with the specified key from the IDictionary<(Of <(<'TKey, TValue>)>)>. public
SetIdentity Sets the identity into the object if supported public, static
ToObject(Object) Populate value properties with those held in the current object public
ToObject(T) Create an instance of T and populate its properties with those held in the current object public
ToObject(Type) Create an instance of type and populate its properties with those held in the current object public
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 DataContractAttribute or EPiServerDataContractAttribute and the property must be marked either with the DataMemberAttribute or EPiServerDataMemberAttribute public, static
ToPropertyBag(Object, IEnumerable(String)) Create a PropertyBag instance and populates it with its properties public, static
TryGetValue Gets the value associated with the specified key. public

Properties

Name Summary Status
Count Gets the number of elements contained in the ICollection<(Of <(<'T>)>)>. public
ICollection(KeyValuePair(String, Object)).IsReadOnly Gets a value indicating whether the ICollection<(Of <(<'T>)>)> is read-only.
Id public
Item Gets or sets the Object with the specified key. public
Keys Gets an ICollection<(Of <(<'T>)>)> containing the keys of the IDictionary<(Of <(<'TKey, TValue>)>)>. public
Target The target object that the PropertyBag is derived from public
Values Gets an ICollection<(Of <(<'T>)>)> containing the values in the IDictionary<(Of <(<'TKey, TValue>)>)>. public

Inheritance

  • System.Object
  • EPiServer.Data.Dynamic.PropertyBag

About Episerver

  • episerver.com
  • Episerver certification
  • Job openings
  • License center
  • Privacy statement

Community

  • Blogs
  • Forums
  • Articles
  • Terms of use
  • EMVP program

Learning resources

  • Technical overview
  • Learning path Episerver CMS
  • Developer guides
  • User guide
  • Video tutorials
  • Episerver GitHub
  • Episerver Education

Contact

Episerver Support

See the Support page for contact information.

Feedback on Episerver World

If you’d like to give feedback about this site, please click here. Thank you very much!
© Episerver 2019 │ About Episerver World