コード例 #1
0
        /// <summary>
        /// Adds a registry to be used during construction.
        /// </summary>
        /// <param name="registry"></param>
        /// <returns></returns>
        public Construktion Apply(ConstruktionRegistry registry)
        {
            registry = registry ?? throw new ArgumentNullException(nameof(registry));

            apply(x => x.Apply(registry.Settings));
            return(this);
        }
コード例 #2
0
        /// <summary>
        /// Supply a configuration expression to be used during construction.
        /// </summary>
        /// <param name="configure"></param>
        /// <returns></returns>
        public Construktion Apply(Action <ConstruktionRegistry> configure)
        {
            var registry = new ConstruktionRegistry();

            configure(registry);

            apply(x => x.Apply(registry.Settings));
            return(this);
        }