Ejemplo n.º 1
0
        public void AddExtension(Selector selector, Extend extends, Env env)
        {
            foreach (var extending in extends.Exact)
            {
                Extender match = null;
                if ((match = Extensions.OfType<ExactExtender>().FirstOrDefault(e => e.BaseSelector.ToString().Trim() == extending.ToString().Trim())) == null)
                {
                    match = new ExactExtender(extending, extends);
                    Extensions.Add(match);
                }

                match.AddExtension(selector, env);
            }

            foreach (var extending in extends.Partial)
            {
                Extender match = null;
                if ((match = Extensions.OfType<PartialExtender>().FirstOrDefault(e => e.BaseSelector.ToString().Trim() == extending.ToString().Trim())) == null)
                {
                    match = new PartialExtender(extending, extends);
                    Extensions.Add(match);
                }

                match.AddExtension(selector, env);
            }
        }
Ejemplo n.º 2
0
        public ExactExtender(Selector baseSelector, Extend extend) : base(baseSelector, extend)
        {

        }
Ejemplo n.º 3
0
        public PartialExtender(Selector baseSelector, Extend extend) : base(baseSelector, extend)
        {

        }
Ejemplo n.º 4
0
 public Extender(Selector baseSelector, Extend extend) : this(baseSelector)
 {
     Extend = extend;
 }