Class PropertyCriteriaCollection
Represents a collection of Property
Inheritance
Namespace: EPiServer
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public class PropertyCriteriaCollection : CollectionBase, IEnumerable<PropertyCriteria>, IEnumerable
Constructors
PropertyCriteriaCollection()
Declaration
public PropertyCriteriaCollection()
Properties
Item[Int32]
Gets or sets the Property
Declaration
public PropertyCriteria this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System. |
index |
Property Value
Type | Description |
---|---|
Property |
Methods
Add(PropertyCriteria)
Adds a Property
Declaration
public void Add(PropertyCriteria criteria)
Parameters
Type | Name | Description |
---|---|---|
Property |
criteria | The Property |
Add(String, PageReference)
Constructs and adds a Property
Declaration
public void Add(string name, PageReference pageLink)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | The name of a PageReference property. |
Page |
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 Property
Declaration
public void Add(string name, PageReference pageLink, CompareCondition compareCondition)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | The name of a PageReference property. |
Page |
pageLink | The PageReference value of the property. |
Compare |
compareCondition | The compare condition. |
Remarks
Required will be set to True.
Add(String, String)
Constructs and adds a Property
Declaration
public void Add(string name, string value)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | The name of a string property. |
System. |
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 Property
Declaration
public void Add(string name, string value, CompareCondition compareCondition)
Parameters
Type | Name | Description |
---|---|---|
System. |
name | The name of a string property. |
System. |
value | The string value of the property. |
Compare |
compareCondition | The compare condition. |
Remarks
Required will be set to True.
AddRange(PropertyCriteriaCollection)
The collection of Property
Declaration
public void AddRange(PropertyCriteriaCollection criterion)
Parameters
Type | Name | Description |
---|---|---|
Property |
criterion | The collection of Property |
Contains(PropertyCriteria)
Determines whether the collection contains a specific element.
Declaration
public bool Contains(PropertyCriteria criteria)
Parameters
Type | Name | Description |
---|---|---|
Property |
criteria | The Property |
Returns
Type | Description |
---|---|
System. |
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 |
---|---|---|
Property |
criterias | The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. |
System. |
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. |
A System.Collections.Generic.IEnumerator<> that can be used to iterate through the collection. |
IndexOf(PropertyCriteria)
Searches for the specified Property
Declaration
public int IndexOf(PropertyCriteria criteria)
Parameters
Type | Name | Description |
---|---|---|
Property |
criteria | The Property |
Returns
Type | Description |
---|---|
System. |
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. |
index | The zero-based index at which value should be inserted. |
Property |
criteria | The Property |
Remove(PropertyCriteria)
Removes the first occurrence of a specific Property
Declaration
public void Remove(PropertyCriteria criteria)
Parameters
Type | Name | Description |
---|---|---|
Property |
criteria | The Property |
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. |
propertyCriteriaName | Name of the property criteria. |
Property |
foundCriterion | Collection of PropertyCriteria which name's property equal propertyCriteriaName. |
Returns
Type | Description |
---|---|
System. |
true if found such element otherwise false |