API Help
Eplan.EplApi.DataModel Namespace / ICustomFilter Interface
Members Example

In This Topic
    ICustomFilter Interface
    In This Topic
    This is an interface that can be used for user-defined filtering in DMObjectsFinder. User has to implement "IsMatching" method by himself.
    Syntax
    public interface ICustomFilter 
    public interface class ICustomFilter 
    Example
    class MyFilter : ICustomFilter
    {
    	public bool IsMatching(StorableObject obj)
    	{
    		Function f = obj as Function;
    		if (f != null)
    		{
    			return (f.IsMainFunction && f.SubFunctions.Length != 0);
    		}
    		return false;
    	}
    }
    
    Project proj;//a valid project
    DMObjectsFinder finder = new DMObjectsFinder(proj);
    Function[] functions = finder.GetFunctionsWithCF(new MyFilter());
    //now as a result we have main functions having at least one subfunction.
    Public Methods
     NameDescription
     MethodThis method should be overridden in order to implement the filter.  
    Top
    See Also