IAdmCompoundCriteriaItem

The IAdmCompoundCriteriaItem interface represents a compound criteria item used in Criteria. A compound criteria item enables you to combine multiple criteria items using a logical operator, AND or OR.

Inheritance: IAdmCriteriaItem

Methods

Properties

Details

AddItem()

Adds a nested criteria item to this compound criteria item.

void AddItem(IAdmCriteriaItem item)

Examples

The following code sample creates a compound criteria item and adds a nested criteria item to it.

PowerShell
[Reflection.Assembly]::LoadWithPartialName("Softerra.Adaxes.Adsi")

$criteria = YOUR-CRITERIA

# Add simple item to compound item.
$simpleItem = $criteria.CreateSimple()
$compoundItem = $criteria.CreateCompound()
$compoundItem.AddItem($simpleItem)
C#
using Softerra.Adaxes.Directory.Criteria;
using Softerra.Adaxes.Interop.Adsi.Criteria;

class Program
{
    public static void Main()
    {
        // Create empty criteria.
        criteria = <YOUR-CRITERIA>;

        // Add simple item to compound item.
        IAdmSimpleCriteriaItem simpleItem = new SimpleCriteriaItem();
        IAdmCompoundCriteriaItem compoundItem = new CompoundCriteriaItem();
        compoundItem.AddItem(simpleItem);
    }
}

GetItem()

Gets a nested criteria item by index.

IAdmCriteriaItem GetItem(int index)

RemoveItem()

Removes a nested criteria item by index.

void RemoveItem(int index)

RemoveAllItems()

Removes all nested criteria items.

void RemoveAllItems()

LogicalOperator

Gets or sets the logical operator for evaluating multiple nested criteria items. The default logical operator is AND.


ItemCount

Gets the number of nested criteria items.

  • Type:
  • int
  • Access:
  • Read-only

Requirements

Minimum required version: 2023

See also