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); } }
public ExactExtender(Selector baseSelector, Extend extend) : base(baseSelector, extend) { }
public PartialExtender(Selector baseSelector, Extend extend) : base(baseSelector, extend) { }
public Extender(Selector baseSelector, Extend extend) : this(baseSelector) { Extend = extend; }