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

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

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

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

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

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

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