예제 #1
0
 public override bool Meet(string con, IPara v)
 {
     if (v == null)
     {
         return(false);
     }
     if ("==".Equals(con))
     {
         if (v is IntPara)
         {
             return(map.Count == (int)v.GetValue());
         }
     }
     else
     {
         if (CON_NOT_EQUAL.Equals(con))
         {
             if (v is StringPara)
             {
                 return(map.ContainsKey((string)v.GetValue()));
             }
         }
     }
     return(false);
 }
예제 #2
0
 public override bool Meet(string con, IPara v)
 {
     if (v == null)
     {
         return(false);
     }
     if ("==".Equals(con))
     {
         if (value != null)
         {
             return(value.Equals(v.GetValue()));
         }
     }
     else
     {
         if (CON_NOT_EQUAL.Equals(con))
         {
             if (value != null)
             {
                 return(!value.Equals(v.GetValue()));
             }
         }
     }
     return(false);
 }
예제 #3
0
 public override IPara Initial(string con, string v)
 {
     if ("==".Equals(con))
     {
         try
         {
             return(new IntPara(EMPTY_NAME, int.Parse(v)));
         }
         catch (Exception)
         {
             return(new IntPara(EMPTY_NAME, 0));
         }
     }
     else
     {
         if (CON_NOT_EQUAL.Equals(con))
         {
             return(new StringPara(EMPTY_NAME, v));
         }
     }
     return(new com.wd.free.para.MapPara());
 }