Class DynamicPropertyCollection
Represents a collection of DynamicProperty classes.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.DataAbstraction
Assembly: EPiServer.dll
Version: 8.11.0Syntax
public class DynamicPropertyCollection : CollectionBase, IList, ICollection, IEnumerable
Constructors
DynamicPropertyCollection()
Initializes a new instance of the DynamicPropertyCollection class.
Declaration
public DynamicPropertyCollection()
DynamicPropertyCollection(DynamicProperty[])
Initializes a new instance of the DynamicPropertyCollection class.
Declaration
public DynamicPropertyCollection(DynamicProperty[] props)
Parameters
Type | Name | Description |
---|---|---|
DynamicProperty[] | props | Array of objects to populate the newly initialized instance with. |
DynamicPropertyCollection(ILanguageBranchRepository)
Initializes a new instance of the DynamicPropertyCollection class.
Declaration
public DynamicPropertyCollection(ILanguageBranchRepository languageBranchRepository)
Parameters
Type | Name | Description |
---|---|---|
ILanguageBranchRepository | languageBranchRepository | The language branch repository. |
Properties
Item[Int32]
Gets or sets the DynamicProperty associated with the specified index.
Declaration
public DynamicProperty this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type | Description |
---|---|
DynamicProperty |
Item[String]
Gets or sets the DynamicProperty associated with the specified index.
Declaration
public DynamicProperty this[string name] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.String | name |
Property Value
Type | Description |
---|---|
DynamicProperty |
Methods
Add(DynamicProperty)
Adds a DynamicProperty to the end of the collection.
Declaration
public void Add(DynamicProperty property)
Parameters
Type | Name | Description |
---|---|---|
DynamicProperty | property | The DynamicProperty to be added to the end of the collection. |
AddRange(DynamicPropertyCollection)
Adds an collection of objects to the end of the collection.
Declaration
public void AddRange(DynamicPropertyCollection properties)
Parameters
Type | Name | Description |
---|---|---|
DynamicPropertyCollection | properties | The DynamicPropertyCollection to be added to the end of the collection. |
Contains(DynamicProperty)
Determines whether the collection contains a specific element.
Declaration
public bool Contains(DynamicProperty property)
Parameters
Type | Name | Description |
---|---|---|
DynamicProperty | property | The DynamicProperty to locate in the CollectionBase. |
Returns
Type | Description |
---|---|
System.Boolean | True if the collection contains the specified value; otherwise, false. |
CopyTo(DynamicProperty[], Int32)
Copies the entire collection to a one-dimensional array, starting at the specified index of the target array.
Declaration
public void CopyTo(DynamicProperty[] properties, int index)
Parameters
Type | Name | Description |
---|---|---|
DynamicProperty[] | properties | The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. |
System.Int32 | index | The zero-based index in array at which copying begins. |
IndexOf(DynamicProperty)
Searches for the specified DynamicProperty and returns the zero-based index of the first occurrence within the entire collection.
Declaration
public int IndexOf(DynamicProperty property)
Parameters
Type | Name | Description |
---|---|---|
DynamicProperty | property | The DynamicProperty to locate in the CollectionBase. |
Returns
Type | Description |
---|---|
System.Int32 | The zero-based index of the first occurrence of value within the entire collection, if found; otherwise, -1. |
Insert(Int32, DynamicProperty)
Inserts an element into the collection at the specified index.
Declaration
public void Insert(int index, DynamicProperty property)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which value should be inserted. |
DynamicProperty | property | The DynamicProperty to insert. |
Remove(DynamicProperty)
Removes the first occurrence of a specific DynamicProperty from the collection.
Declaration
public void Remove(DynamicProperty property)
Parameters
Type | Name | Description |
---|---|---|
DynamicProperty | property | The DynamicProperty to remove from the collection. |
RemoveInaccessibleLanguagesForUser(IPrincipal)
Removes the language specific properties that are inaccessible for the user.
Declaration
public void RemoveInaccessibleLanguagesForUser(IPrincipal user)
Parameters
Type | Name | Description |
---|---|---|
System.Security.Principal.IPrincipal | user | The user. |
Remarks
Based on the access rights for languages, the properties that are of a language not enabled for the given user will be removed from the collection.
ToPropertyDataCollection()
Declaration
public PropertyDataCollection ToPropertyDataCollection()
Returns
Type | Description |
---|---|
PropertyDataCollection |