Esempio n. 1
0
        public DeleteProperties(
            XElement element,
            DeleteAttributes attributes,
            Extension<EvaluationContextResolver> context)
            : base(element)
        {
            Contract.Requires<ArgumentNullException>(element != null);
            Contract.Requires<ArgumentNullException>(attributes != null);
            Contract.Requires<ArgumentNullException>(context != null);

            this.attributes = attributes;
            this.context = context;

            this.at = new Lazy<XPathExpression>(() =>
                !string.IsNullOrEmpty(attributes.At) ? context.Value.Context.CompileXPath(element, attributes.At) : null);
        }
Esempio n. 2
0
        public DeleteProperties(
            XElement element,
            DeleteAttributes attributes,
            Extension <EvaluationContextResolver> context)
            : base(element)
        {
            Contract.Requires <ArgumentNullException>(element != null);
            Contract.Requires <ArgumentNullException>(attributes != null);
            Contract.Requires <ArgumentNullException>(context != null);

            this.attributes = attributes;
            this.context    = context;

            this.at = new Lazy <XPathExpression>(() =>
                                                 !string.IsNullOrEmpty(attributes.At) ? context.Value.Context.CompileXPath(element, attributes.At) : null);
        }