IFilterCriteria Interface

System Center
Use the IFilterCriteria interface to programmatically access to a single filter condition.

Namespace: Microsoft.SystemCenter.Orchestrator.Integration
Assembly: Microsoft.SystemCenter.Orchestrator.Integration (in Microsoft.SystemCenter.Orchestrator.Integration.dll)

'Usage
Dim instance As IFilterCriteria

public interface IFilterCriteria
public interface IFilterCriteria
public interface IFilterCriteria

public SelectQuery GetSelectQueryFrom(IActivityRequest request)
{
    StringBuilder conditions = new StringBuilder();
    foreach (IFilterCriteria filter in request.Filters)
    {
        if (conditions.Length != 0)     
            conditions.Append(" AND "); 

        conditions.Append(filter.Name);

        switch (filter.Relation)
        {
           case Relation.EqualTo:
                conditions.Append("=");
                break;

            case Relation.NotEqualTo:
                conditions.Append("<>");

            // ...
        }

        conditions.AppendFormat("'{0}'", filter.Value.AsString);
    }

    string className = request.Inputs["Class Name"].AsString;
    return SelectQuery(className, conditions);
}

The IFilterCriteria interface will typically be used by those Activity classes that require customized querying solutions beyond the filtering support provided by IActivityRequest.


Development Platforms

Windows Vista, Windows Server 2003, and

Target Platforms

 
Show: