Example #1
0
        /// <summary>
        /// Copy and replace from <paramref name="args"/>.
        /// </summary>
        /// <param name="args">The <see cref="DatabaseConsoleArgs"/> to copy from.</param>
        protected void CopyFrom(DatabaseConsoleArgs args)
        {
            base.CopyFrom(args);
            Command           = args.Command;
            SupportedCommands = args.SupportedCommands;
            UseBeefDbo        = args.UseBeefDbo;
            SchemaOrder.Clear();
            SchemaOrder.AddRange(args.SchemaOrder);
            ScriptName = args.ScriptName;
            if (args.ScriptArguments != null)
            {
                ScriptArguments = new Dictionary <string, string?>(args.ScriptArguments);
            }

            if (args.ExecuteStatements != null)
            {
                ExecuteStatements = new List <string>(args.ExecuteStatements);
            }
        }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DatabaseExecutorArgs"/> class from a <see cref="DatabaseConsoleArgs"/>.
 /// </summary>
 /// <param name="args">The <see cref="DatabaseConsoleArgs"/>.</param>
 public DatabaseExecutorArgs(DatabaseConsoleArgs args) : base() => CopyFrom(args);