Exemplo n.º 1
0
    /// <summary>
    /// 注册选人
    /// </summary>
    /// <param name="_abs"></param>
    public void RegisterFilter(AbsFilter _abs)
    {
        string key = _abs.Key;

        if (!mFilterList.ContainsKey(key))
        {
            mFilterList.Add(key, _abs);
        }
    }
Exemplo n.º 2
0
    public AbsFilter CreateFilter(string _str)
    {
        string str = _str.ToLower();

        string[] strArr = str.Split(DefineMgr.Split_Line.ToCharArray());
        if (strArr.Length > 0)
        {
            List <string> paramArr = new List <string>(strArr);
            string        clsName  = paramArr[0];
            AbsFilter     filter   = null;
            mFilterList.TryGetValue(clsName, out filter);
            if (filter == null)
            {
                LogMgr.Error("--- Not found Filter clsName:{0}", clsName);
                return(null);
            }

            paramArr.RemoveAt(0);
            AbsFilter ret = filter.Clone();
            ret.Parser(ref paramArr);
            return(ret);
        }
        return(null);
    }
Exemplo n.º 3
0
 public void ParseFilterStr(ref string _str)
 {
     mFilter = FuncsMgr.Ins.CreateFilter(_str);
 }