Exemple #1
0
        public LoadProperties(
            XElement element,
            LoadAttributes 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.show = new Lazy<LoadShow>(() =>
                !string.IsNullOrEmpty(attributes.Show) ? (LoadShow)Enum.Parse(typeof(LoadShow), attributes.Show, true) : LoadShow.Replace);
        }
Exemple #2
0
        public LoadProperties(
            XElement element,
            LoadAttributes 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.show = new Lazy <LoadShow>(() =>
                                            !string.IsNullOrEmpty(attributes.Show) ? (LoadShow)Enum.Parse(typeof(LoadShow), attributes.Show, true) : LoadShow.Replace);
        }