Пример #1
0
        /* ----------------------------------------------------------------- */
        ///
        /// CreateInstaller
        ///
        /// <summary>
        /// Creates a new instance of the Installer class with the
        /// specified arguments.
        /// </summary>
        ///
        /// <param name="src">Source arguments.</param>
        ///
        /// <returns>Installer object.</returns>
        ///
        /* ----------------------------------------------------------------- */
        public static Installer CreateInstaller(this ArgumentCollection src)
        {
            var dest = new Installer(Format.Json, src.GetConfiguration())
            {
                Recursive         = src.HasForceOption(),
                ResourceDirectory = src.GetResourceDirectory(),
            };

            src.ReplaceDirectory(dest.Config);
            return(dest);
        }