Esempio n. 1
0
 //----------------------------------------------------------------
 public static void RegisterType(CDefPostFilter def)
 {
     if (def != null)
     {
         m_dicIdTypePostFilterToType[def.Id] = def;
     }
 }
Esempio n. 2
0
        //----------------------------------------------------------------
        public static CDefPostFilter GetDef(string strId)
        {
            CDefPostFilter def = null;

            m_dicIdTypePostFilterToType.TryGetValue(strId, out def);
            return(def);
        }
Esempio n. 3
0
        //----------------------------------------------------------------
        public override bool Equals(object obj)
        {
            CDefPostFilter def = obj as CDefPostFilter;

            if (def != null)
            {
                return(def.Id == Id);
            }
            return(false);
        }
Esempio n. 4
0
        //----------------------------------------------------------------
        public static IPostFilter GetPostFilter(string strId)
        {
            CDefPostFilter def = GetDef(strId);

            if (def != null)
            {
                IPostFilter filter = Activator.CreateInstance(def.TypePostFilter, new object[0]) as IPostFilter;
                return(filter);
            }
            return(null);
        }