public ActionProperties( XElement element, ActionAttributes attributes, Extension <EvaluationContextResolver> contextResolver) : base(element) { Contract.Requires <ArgumentNullException>(element != null); Contract.Requires <ArgumentNullException>(contextResolver != null); this.attributes = attributes; this.contextResolver = contextResolver; this.while_ = new Lazy <XPathExpression>(() => !string.IsNullOrEmpty(attributes.White) ? contextResolver.Value.Context.CompileXPath(element, attributes.White) : null); this.if_ = new Lazy <XPathExpression>(() => !string.IsNullOrEmpty(attributes.If) ? contextResolver.Value.Context.CompileXPath(element, attributes.If) : null); this.iterate = new Lazy <XPathExpression>(() => !string.IsNullOrEmpty(attributes.Iterate) ? contextResolver.Value.Context.CompileXPath(element, attributes.Iterate) : null); }
public ActionProperties( XElement element, ActionAttributes attributes, Extension<EvaluationContextResolver> contextResolver) : base(element) { Contract.Requires<ArgumentNullException>(element != null); Contract.Requires<ArgumentNullException>(contextResolver != null); this.attributes = attributes; this.contextResolver = contextResolver; this.while_ = new Lazy<XPathExpression>(() => !string.IsNullOrEmpty(attributes.White) ? contextResolver.Value.Context.CompileXPath(element, attributes.White) : null); this.if_ = new Lazy<XPathExpression>(() => !string.IsNullOrEmpty(attributes.If) ? contextResolver.Value.Context.CompileXPath(element, attributes.If) : null); this.iterate = new Lazy<XPathExpression>(() => !string.IsNullOrEmpty(attributes.Iterate) ? contextResolver.Value.Context.CompileXPath(element, attributes.Iterate) : null); }