Class PropertyCriteriaCollection
Represents a collection of PropertyCriteria instances.
Inheritance
Implements
Inherited Members
Namespace: EPiServer
Assembly: EPiServer.dll
Version: 10.10.4Syntax
public class PropertyCriteriaCollection : CollectionBase, IList, ICollection, IEnumerable<PropertyCriteria>, IEnumerable
Constructors
PropertyCriteriaCollection()
Declaration
public PropertyCriteriaCollection()
Properties
Item[Int32]
Gets or sets the PropertyCriteria associated with the specified index.
Declaration
public PropertyCriteria this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type | Description |
---|---|
PropertyCriteria |
Methods
Add(PropertyCriteria)
Adds a PropertyCriteria instance to the end of the collection.
Declaration
public void Add(PropertyCriteria criteria)
Parameters
Type | Name | Description |
---|---|---|
PropertyCriteria | criteria | The PropertyCriteria to be added to the end of the collection. |
Add(String, PageReference)
Constructs and adds a PropertyCriteria instance to the end of the collection.
Declaration
public void Add(string name, PageReference pageLink)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of a PageReference property. |
PageReference | pageLink | The PageReference value of the property. |
Remarks
Condition will be set to CompareCondition.Equal and Required to True.
Add(String, PageReference, CompareCondition)
Constructs and adds a PropertyCriteria instance to the end of the collection.
Declaration
public void Add(string name, PageReference pageLink, CompareCondition compareCondition)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of a PageReference property. |
PageReference | pageLink | The PageReference value of the property. |
CompareCondition | compareCondition | The compare condition. |
Remarks
Required will be set to True.
Add(String, String)
Constructs and adds a PropertyCriteria instance to the end of the collection.
Declaration
public void Add(string name, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of a string property. |
System.String | value | The string value of the property. |
Remarks
Condition will be set to CompareCondition.Equal and Required to True.
Add(String, String, CompareCondition)
Constructs and adds a PropertyCriteria instance to the end of the collection.
Declaration
public void Add(string name, string value, CompareCondition compareCondition)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name of a string property. |
System.String | value | The string value of the property. |
CompareCondition | compareCondition | The compare condition. |
Remarks
Required will be set to True.
AddRange(PropertyCriteriaCollection)
The collection of PropertyCriteria should be added to end of the List. The collection itself can NOT be a null reference
Declaration
public void AddRange(PropertyCriteriaCollection criterion)
Parameters
Type | Name | Description |
---|---|---|
PropertyCriteriaCollection | criterion | The collection of PropertyCriteria to be added to the end of the collection. |
Contains(PropertyCriteria)
Determines whether the collection contains a specific element.
Declaration
public bool Contains(PropertyCriteria criteria)
Parameters
Type | Name | Description |
---|---|---|
PropertyCriteria | criteria | The PropertyCriteria to locate in the CollectionBase. |
Returns
Type | Description |
---|---|
System.Boolean | true if the collection contains the specified value; otherwise, false. |
CopyTo(PropertyCriteria[], Int32)
Copies the entire collection to a one-dimensional array, starting at the specified index of the target array.
Declaration
public void CopyTo(PropertyCriteria[] criterias, int index)
Parameters
Type | Name | Description |
---|---|---|
PropertyCriteria[] | criterias | 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. |
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<PropertyCriteria> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<PropertyCriteria> | A System.Collections.Generic.IEnumerator<T> that can be used to iterate through the collection. |
IndexOf(PropertyCriteria)
Searches for the specified PropertyCriteria and returns the zero-based index of the first occurrence within the entire collection.
Declaration
public int IndexOf(PropertyCriteria criteria)
Parameters
Type | Name | Description |
---|---|---|
PropertyCriteria | criteria | The PropertyCriteria 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, PropertyCriteria)
Inserts an element into the collection at the specified index.
Declaration
public void Insert(int index, PropertyCriteria criteria)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The zero-based index at which value should be inserted. |
PropertyCriteria | criteria | The PropertyCriteria to insert. |
Remove(PropertyCriteria)
Removes the first occurrence of a specific PropertyCriteria from the collection.
Declaration
public void Remove(PropertyCriteria criteria)
Parameters
Type | Name | Description |
---|---|---|
PropertyCriteria | criteria | The PropertyCriteria to remove from the collection. |
TryToFind(String, out PropertyCriteriaCollection)
Tries to find all element which has name equal with propertyCriteriaName .
Declaration
public bool TryToFind(string propertyCriteriaName, out PropertyCriteriaCollection foundCriterion)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyCriteriaName | Name of the property criteria. |
PropertyCriteriaCollection | foundCriterion | Collection of PropertyCriteria which name's property equal propertyCriteriaName. |
Returns
Type | Description |
---|---|
System.Boolean | true if found such element otherwise false |