Esempio n. 1
0
        // return value: whether the list contains at least one "true" item
        public bool FilterByCond(DICond dic, GErrList gerrlist)
        {
            if (dic == null)
            {
                throw new ExceptionGlyph("GErrList", "FilterByCondition", "Null argument");
            }
            bool res = false;

            foreach (GErr gerr in this.gerrs)
            {
                if (dic(gerr))
                {
                    if (gerrlist != null)
                    {
                        gerrlist.Add(gerr);
                        res = true;
                    }
                }
            }
            return(res);
        }
 public DIActionOnCondBuilder(DICond dic, DIAction dia)
 {
     this.dic=dic;
     this.dia=dia;
 }
 public DIActionOnCondBuilder(DICond dic, DIAction dia)
 {
     this.dic = dic;
     this.dia = dia;
 }
Esempio n. 4
0
 // return value: whether the list contains at least one "true" item 
 public bool FilterByCond(DICond dic, GErrList gerrlist)
 {
     if (dic==null)
     {
         throw new ExceptionGlyph("GErrList","FilterByCondition","Null argument");
     }
     bool res=false;
     foreach (GErr gerr in this.gerrs)
     {
         if (dic(gerr))
         {
             if (gerrlist!=null)
             {
                 gerrlist.Add(gerr);
                 res=true;
             }
         }
     }
     return res;
 }