Class CollectionPropertyTransformation<ResultType>
- Namespace
- CMS.DataEngine
- Assembly
- CMS.DataEngine.dll
Property transformation for a collection. Enumerates the properties of the collection objects and does transformation according to that property.
public class CollectionPropertyTransformation<ResultType> : IHierarchicalObject, INameIndexable
Type Parameters
ResultType
- Inheritance
-
objectCollectionPropertyTransformation<ResultType>
- Implements
- Extension Methods
Constructors
CollectionPropertyTransformation(IInfoObjectCollection, Func<IInfoObjectCollection, string, ResultType>, Func<IInfoObjectCollection, List<string>>)
Constructor
public CollectionPropertyTransformation(IInfoObjectCollection collection, Func<IInfoObjectCollection, string, ResultType> transformation, Func<IInfoObjectCollection, List<string>> propertiesTransformation)
Parameters
collection
IInfoObjectCollectionParent collection
transformation
Func<IInfoObjectCollection, string, ResultType>Transformation function
propertiesTransformation
Func<IInfoObjectCollection, List<string>>Transformation to get list of properties
Fields
mCachedResults
Cached results of the transformation
protected Hashtable mCachedResults
Field Value
- Hashtable
Properties
CacheResults
If true, the results of the transformation are cached
public bool CacheResults { get; set; }
Property Value
- bool
CaseSensitive
If true, the transformation is case sensitive (default is case insensitive)
public bool CaseSensitive { get; set; }
Property Value
- bool
this[string]
Interface to access collections through string indexers by name
public ResultType this[string name] { get; }
Parameters
name
string
Property Value
- ResultType
ParentCollection
Parent collection
public IInfoObjectCollection ParentCollection { get; protected set; }
Property Value
Properties
Properties of the object available through GetProperty.
public List<string> Properties { get; }
Property Value
- List<string>
PropertiesTransformation
Transformation function for list of properties
protected Func<IInfoObjectCollection, List<string>> PropertiesTransformation { get; set; }
Property Value
- Func<IInfoObjectCollection, List<string>>
Transformation
Transformation function
protected Func<IInfoObjectCollection, string, ResultType> Transformation { get; set; }
Property Value
- Func<IInfoObjectCollection, string, ResultType>
Methods
GetProperty(string)
Returns property with given name (either object or property value).
public object GetProperty(string columnName)
Parameters
columnName
stringColumn name
Returns
- object
TryGetProperty(string, out object)
Returns property with given name (either object or property value).
public bool TryGetProperty(string columnName, out object value)
Parameters
columnName
stringColumn name
value
objectReturns the value
Returns
- bool
Returns true if the operation was successful (the value was present)