Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Class PropertyCriteriaCollection

Represents a collection of PropertyCriteria instances.

Inheritance
System.Object
System.Collections.CollectionBase
PropertyCriteriaCollection
Implements
System.Collections.IList
System.Collections.ICollection
System.Collections.Generic.IEnumerable<PropertyCriteria>
System.Collections.IEnumerable
Inherited Members
System.Collections.CollectionBase.Clear()
System.Collections.CollectionBase.RemoveAt(System.Int32)
System.Collections.CollectionBase.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
System.Collections.CollectionBase.System.Collections.IList.get_Item(System.Int32)
System.Collections.CollectionBase.System.Collections.IList.set_Item(System.Int32, System.Object)
System.Collections.CollectionBase.System.Collections.IList.Contains(System.Object)
System.Collections.CollectionBase.System.Collections.IList.Add(System.Object)
System.Collections.CollectionBase.System.Collections.IList.Remove(System.Object)
System.Collections.CollectionBase.System.Collections.IList.IndexOf(System.Object)
System.Collections.CollectionBase.System.Collections.IList.Insert(System.Int32, System.Object)
System.Collections.CollectionBase.OnSet(System.Int32, System.Object, System.Object)
System.Collections.CollectionBase.OnInsert(System.Int32, System.Object)
System.Collections.CollectionBase.OnClear()
System.Collections.CollectionBase.OnRemove(System.Int32, System.Object)
System.Collections.CollectionBase.OnValidate(System.Object)
System.Collections.CollectionBase.OnSetComplete(System.Int32, System.Object, System.Object)
System.Collections.CollectionBase.OnInsertComplete(System.Int32, System.Object)
System.Collections.CollectionBase.OnClearComplete()
System.Collections.CollectionBase.OnRemoveComplete(System.Int32, System.Object)
System.Collections.CollectionBase.InnerList
System.Collections.CollectionBase.List
System.Collections.CollectionBase.Capacity
System.Collections.CollectionBase.Count
System.Collections.CollectionBase.System.Collections.IList.IsReadOnly
System.Collections.CollectionBase.System.Collections.IList.IsFixedSize
System.Collections.CollectionBase.System.Collections.ICollection.IsSynchronized
System.Collections.CollectionBase.System.Collections.ICollection.SyncRoot
System.Collections.CollectionBase.System.Collections.IList.Item[System.Int32]
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer
Assembly: EPiServer.dll
Version: 11.20.7
Syntax
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

Implements

System.Collections.IList
System.Collections.ICollection
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable

Extension Methods