Пример #1
0
            /// <summary>
            ///     <para>Initializes a new instance of the <see cref="DropDatabase" /> class.</para>
            ///     <para>The arguments supported by <paramref name="args" /> are:</para>
            ///     <para><c>contextType</c>--The <see cref="DbContext" /> to use.</para>
            /// </summary>
            /// <param name="executor"> The operation executor. </param>
            /// <param name="resultHandler"> The <see cref="IOperationResultHandler" />. </param>
            /// <param name="args"> The operation arguments. </param>
            public DropDatabase(
                OperationExecutor executor,
                IOperationResultHandler resultHandler,
                IDictionary args)
                : base(resultHandler)
            {
                Check.NotNull(executor, nameof(executor));
                Check.NotNull(args, nameof(args));

                var contextType = (string?)args["contextType"];

                Execute(() => executor.DropDatabaseImpl(contextType));
            }
Пример #2
0
            public DropDatabase(
                [NotNull] OperationExecutor executor,
                [NotNull] object resultHandler,
                [NotNull] IDictionary args)
                : base(resultHandler)
            {
                Check.NotNull(executor, nameof(executor));
                Check.NotNull(args, nameof(args));

                var contextType  = (string)args["contextType"];
                var confirmCheck = (Func <string, string, bool>)args["confirmCheck"];

                Execute(() => executor.DropDatabaseImpl(contextType, confirmCheck));
            }