public static FilterConnector Deserialize(dynamic obj)
        {
            var fc = new FilterConnector();

            fc.Logic  = obj.l;
            fc.Filter = Filter.Deserialize(obj.f);
            return(fc);
        }
        public Filter And(Filter f)
        {
            var connector = new FilterConnector()
            {
                Logic = FilterLogic.And, Filter = f
            };

            Filters.Add(connector);
            return(this);
        }
        public static Filter Deserialize(dynamic f)
        {
            Filter filter = null;

            filter = new Filter(f.p.ToString(), f.o.ToString(), f.v, f.t.ToString());
            if (f.vi != null)
            {
                filter.Visible = f.vi;
            }

            if (f.f != null && f.f.Count > 0)
            {
                filter.Filters = new List <FilterConnector>();

                foreach (var ff in f.f)
                {
                    filter.Filters.Add(FilterConnector.Deserialize(ff));
                }
            }

            return(filter);
        }
 public FilterConnector(FilterConnector connectorToClone)
 {
     Logic  = connectorToClone.Logic;
     Filter = new Filter(connectorToClone.Filter);
 }