Class CollectionPropertyWrapper<ObjectType>
- Namespace
- CMS.DataEngine
- Assembly
- CMS.DataEngine.dll
Wrapper that transforms the collection to values of its object properties
public class CollectionPropertyWrapper<ObjectType> : CollectionPropertyWrapper, IIndexable<ObjectProperty>, INameIndexable<ObjectProperty>, INameIndexable, IIndexable where ObjectType : BaseInfo, IHierarchicalDataContainer
Type Parameters
ObjectType
- Inheritance
-
objectCollectionPropertyWrapper<ObjectType>
- Implements
- Extension Methods
Constructors
CollectionPropertyWrapper(IInfoObjectCollection<ObjectType>, string)
Constructor
public CollectionPropertyWrapper(IInfoObjectCollection<ObjectType> collection, string propertyName)
Parameters
collection
IInfoObjectCollection<ObjectType>Collection to wrap
propertyName
stringProperty to extract
Properties
Collection
Collection to wrap
public IInfoObjectCollection<ObjectType> Collection { get; protected set; }
Property Value
- IInfoObjectCollection<ObjectType>
Count
Returns the number of items.
public int Count { get; }
Property Value
- int
this[int]
Gets or sets the object on specific index.
public virtual ObjectProperty this[int index] { get; set; }
Parameters
index
intObject index to get
Property Value
this[string]
Returns the property of an object registered by the specific name.
public virtual ObjectProperty this[string name] { get; set; }
Parameters
name
stringObject name (indexer)
Property Value
PropertyName
Property name to extract
public string PropertyName { get; protected set; }
Property Value
- string
Methods
GetEnumerator()
Gets the enumerator for the collection.
public virtual IEnumerator<ObjectProperty> GetEnumerator()
Returns
- IEnumerator<ObjectProperty>
GetProperty(ObjectType)
Gets the property value for the given object
protected virtual ObjectProperty GetProperty(ObjectType obj)
Parameters
obj
ObjectTypeObj from which to take the property