コード例 #1
0
ファイル: SetValueProperties.cs プロジェクト: tvoyle/nxkit
        public SetValueProperties(
            XElement element,
            Extension<EvaluationContextResolver> context)
            : base(element)
        {
            Contract.Requires<ArgumentNullException>(element != null);
            Contract.Requires<ArgumentNullException>(context != null);

            this.attributes = element.AnnotationOrCreate<SetValueAttributes>(() => new SetValueAttributes(element));
            this.context = context;

            this.value = new Lazy<XPathExpression>(() =>
                !string.IsNullOrEmpty(attributes.Value) ? context.Value.Context.CompileXPath(element, attributes.Value) : null);
        }
コード例 #2
0
ファイル: SetValueProperties.cs プロジェクト: nxkit/nxkit
        public SetValueProperties(
            XElement element,
            Extension<EvaluationContextResolver> context)
            : base(element)
        {
            Contract.Requires<ArgumentNullException>(element != null);
            Contract.Requires<ArgumentNullException>(context != null);

            this.attributes = element.AnnotationOrCreate<SetValueAttributes>(() => new SetValueAttributes(element));
            this.context = context;

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