Class DynamicPropertyCollection

Represents a collection of DynamicProperty classes.

Inheritance
System.Object
System.Collections.CollectionBase
DynamicPropertyCollection
Implements
System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable
Inherited Members
System.Collections.CollectionBase.Clear()
System.Collections.CollectionBase.RemoveAt(System.Int32)
System.Collections.CollectionBase.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
System.Collections.CollectionBase.System.Collections.IList.get_Item(System.Int32)
System.Collections.CollectionBase.System.Collections.IList.set_Item(System.Int32, System.Object)
System.Collections.CollectionBase.System.Collections.IList.Contains(System.Object)
System.Collections.CollectionBase.System.Collections.IList.Add(System.Object)
System.Collections.CollectionBase.System.Collections.IList.Remove(System.Object)
System.Collections.CollectionBase.System.Collections.IList.IndexOf(System.Object)
System.Collections.CollectionBase.System.Collections.IList.Insert(System.Int32, System.Object)
System.Collections.CollectionBase.GetEnumerator()
System.Collections.CollectionBase.OnSet(System.Int32, System.Object, System.Object)
System.Collections.CollectionBase.OnInsert(System.Int32, System.Object)
System.Collections.CollectionBase.OnClear()
System.Collections.CollectionBase.OnRemove(System.Int32, System.Object)
System.Collections.CollectionBase.OnValidate(System.Object)
System.Collections.CollectionBase.OnSetComplete(System.Int32, System.Object, System.Object)
System.Collections.CollectionBase.OnInsertComplete(System.Int32, System.Object)
System.Collections.CollectionBase.OnClearComplete()
System.Collections.CollectionBase.OnRemoveComplete(System.Int32, System.Object)
System.Collections.CollectionBase.InnerList
System.Collections.CollectionBase.List
System.Collections.CollectionBase.Capacity
System.Collections.CollectionBase.Count
System.Collections.CollectionBase.System.Collections.IList.IsReadOnly
System.Collections.CollectionBase.System.Collections.IList.IsFixedSize
System.Collections.CollectionBase.System.Collections.ICollection.IsSynchronized
System.Collections.CollectionBase.System.Collections.ICollection.SyncRoot
System.Collections.CollectionBase.System.Collections.IList.Item[System.Int32]
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.DataAbstraction
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
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

A PropertyDataCollection

Implements

System.Collections.IList
System.Collections.ICollection
System.Collections.IEnumerable

Extension Methods