Exemple #1
0
        public void AddLineAsString(string s)
        {
            var line = new FilterLine(s);

            line.Init();
            this.LineList.Add(line);
        }
        public IFilterLine Clone()
        {
            var res = new FilterLine(this.raw);

            res.Init();
            res.Value = this.Value;
            return(res);
        }
Exemple #3
0
        public void SetValue <T>(T value, int nr = 0) where T : IFilterValue
        {
            var line = this.GetLine <T>(nr);

            if (line != null)
            {
                line.Value = value;
                line.Validate();
                return;
            }

            line = new FilterLine("")
            {
                Value    = value,
                Ident    = value.GetStringIdent(),
                LineType = EntryDataType.Rule,
                Enabled  = this.Enabled
            };

            this.LineList.Add(line);
        }