Esempio n. 1
0
        /// <summary>
        /// The over lay.
        /// </summary>
        /// <param name="core">
        /// The core aka the master, template
        /// </param>
        /// <param name="overlay">
        /// The overlaying layer.
        /// </param>
        /// <returns>
        /// The <see cref="Section"/>.
        /// </returns>
        public Section OverLay(Section core, Section overlay)
        {
            var overLayer = new OverLayer();

            // the overlayer handles if arguments are null
            return(overLayer.OverLay(core, overlay));
        }
Esempio n. 2
0
        /// <summary>
        /// The overlayer used by the plugin loader. Meant to take a (plugin)settings
        /// and overlay the core configuration with a (plugin)settings.
        /// </summary>
        /// <param name="filename">
        /// The filename.
        /// </param>
        /// <returns>
        /// The <see cref="Section"/>.
        /// </returns>
        public Section OverLay(string filename)
        {
            var overLayer        = new OverLayer();
            var stfConfiguration = new StfConfiguration();
            var overlay          = stfConfiguration.LoadConfig(filename);

            // the overlayer handles if arguments are null
            currentlyLoadedSection = overLayer.OverLay(currentlyLoadedSection, overlay);
            Environment            = DefaultEnvironment;

            return(currentlyLoadedSection);
        }