Class PropertyDefinitionCollection
Represents a list of PropertyDefinition objects.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.DataAbstraction
Assembly: EPiServer.dll
Version: 9.12.2Syntax
public class PropertyDefinitionCollection : IList<PropertyDefinition>, ICollection<PropertyDefinition>, IEnumerable<PropertyDefinition>, IEnumerable, IReadOnly<PropertyDefinitionCollection>, IReadOnly
Constructors
PropertyDefinitionCollection()
Declaration
public PropertyDefinitionCollection()
Properties
Count
Gets the number of elements contained in the list.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
IsReadOnly
Gets a value indicating if current instance is read-only.
Declaration
public virtual bool IsReadOnly { get; protected set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Item[Int32]
Gets or sets the element at the specified index.
Declaration
public PropertyDefinition this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the element to get or set. |
Property Value
Type | Description |
---|---|
PropertyDefinition | The element at the specified index. |
Methods
Add(PropertyDefinition)
Adds an item to the list.
Declaration
public void Add(PropertyDefinition item)
Parameters
Type | Name | Description |
---|---|---|
PropertyDefinition | item | The object to add to the list. |
Clear()
Removes all items from the list.
Declaration
public void Clear()
Contains(PropertyDefinition)
Determines whether the list contains a specific value.
Declaration
public bool Contains(PropertyDefinition item)
Parameters
Type | Name | Description |
---|---|---|
PropertyDefinition | item | The object to locate in the list. |
Returns
Type | Description |
---|---|
System.Boolean |
|
CopyTo(PropertyDefinition[], Int32)
Copies the elements of the list to an System.Array, starting at a particular array index.
Declaration
public void CopyTo(PropertyDefinition[] array, int arrayIndex)
Parameters
Type | Name | Description |
---|---|---|
PropertyDefinition[] | array | The one-dimensional System.Array that is the destination of the elements copied from the list. The System.Array must have zero-based indexing. |
System.Int32 | arrayIndex | The zero-based index in array at which copying begins. |
CreateWritableClone()
Creates a writable clone of this object.
Declaration
public PropertyDefinitionCollection CreateWritableClone()
Returns
Type | Description |
---|---|
PropertyDefinitionCollection | A clone of this object that is writable. |
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<PropertyDefinition> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<PropertyDefinition> | An enumerator that can be used to iterate through the collection. |
IndexOf(PropertyDefinition)
Determines the index of a specific item in the list.
Declaration
public int IndexOf(PropertyDefinition item)
Parameters
Type | Name | Description |
---|---|---|
PropertyDefinition | item | The object to locate in the list. |
Returns
Type | Description |
---|---|
System.Int32 | The index of item if found in the list; otherwise, -1. |
Insert(Int32, PropertyDefinition)
Inserts an item to the list at the specified index.
Declaration
public void Insert(int index, PropertyDefinition item)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which item should be inserted. |
PropertyDefinition | item | The object to insert into the list. |
MakeReadOnly()
Makes the current instance and all it's properties read-only.
Declaration
public virtual void MakeReadOnly()
Remarks
After calling this method the IsReadOnly property will return true
.
Remove(PropertyDefinition)
Removes the first occurrence of a specific object from the list.
Declaration
public bool Remove(PropertyDefinition item)
Parameters
Type | Name | Description |
---|---|---|
PropertyDefinition | item | The object to remove from the list. |
Returns
Type | Description |
---|---|
System.Boolean |
|
RemoveAt(Int32)
Removes the item at the specified index.
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index of the item to remove. |
ThrowIfReadOnly()
Throws an exception if the current instance is read-only.
Declaration
protected virtual void ThrowIfReadOnly()
Explicit Interface Implementations
IReadOnly.CreateWritableClone()
Creates a writable clone of this object.
Declaration
object IReadOnly.CreateWritableClone()
Returns
Type | Description |
---|---|
System.Object | A clone of this object that is writable. |
IEnumerable.GetEnumerator()
Returns an enumerator that iterates through a collection.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | An System.Collections.IEnumerator object that can be used to iterate through the collection. |