예제 #1
0
 /// <summary>
 /// Initializes a new instance of the MigratorLoggingDecorator class.
 /// </summary>
 /// <param name="innerMigrator"> The migrator that this decorator is wrapping. </param>
 /// <param name="logger"> The logger to write messages to. </param>
 public MigratorLoggingDecorator(MigratorBase innerMigrator, MigrationsLogger logger)
     : base(innerMigrator)
 {
     Check.NotNull <MigratorBase>(innerMigrator, nameof(innerMigrator));
     Check.NotNull <MigrationsLogger>(logger, nameof(logger));
     this._logger = logger;
     this._logger.Verbose(Strings.LoggingTargetDatabase((object)this.TargetDatabase));
 }
        /// <summary>
        ///     Initializes a new instance of the MigratorLoggingDecorator class.
        /// </summary>
        /// <param name = "innerMigrator">The migrator that this decorator is wrapping.</param>
        /// <param name = "logger">The logger to write messages to.</param>
        public MigratorLoggingDecorator(MigratorBase innerMigrator, MigrationsLogger logger)
            : base(innerMigrator)
        {
            //Contract.Requires(innerMigrator != null);
            //Contract.Requires(logger != null);

            _logger = logger;
            _logger.Verbose(Strings.LoggingTargetDatabase(base.TargetDatabase));
        }
        /// <summary>
        ///     Initializes a new instance of the MigratorLoggingDecorator class.
        /// </summary>
        /// <param name="innerMigrator"> The migrator that this decorator is wrapping. </param>
        /// <param name="logger"> The logger to write messages to. </param>
        public MigratorLoggingDecorator(MigratorBase innerMigrator, MigrationsLogger logger)
            : base(innerMigrator)
        {
            Check.NotNull(innerMigrator, "innerMigrator");
            Check.NotNull(logger, "logger");

            _logger = logger;
            _logger.Verbose(Strings.LoggingTargetDatabase(base.TargetDatabase));
        }
        /// <summary>
        ///     Initializes a new instance of the MigratorLoggingDecorator class.
        /// </summary>
        /// <param name="innerMigrator"> The migrator that this decorator is wrapping. </param>
        /// <param name="logger"> The logger to write messages to. </param>
        public MigratorLoggingDecorator(MigratorBase innerMigrator, MigrationsLogger logger)
            : base(innerMigrator)
        {
            Check.NotNull(innerMigrator, "innerMigrator");
            Check.NotNull(logger, "logger");

            _logger = logger;
            _logger.Verbose(Strings.LoggingTargetDatabase(base.TargetDatabase));
        }