예제 #1
0
 protected ProcessorBase(
     [NotNull] IMigrationGenerator generator,
     [NotNull] IAnnouncer announcer,
     [NotNull] ProcessorOptions options)
 {
     Generator      = generator;
     Announcer      = announcer;
     Options        = options;
     _legacyOptions = options;
     Logger         = new AnnouncerFluentMigratorLogger(announcer);
 }
예제 #2
0
        protected ProcessorBase(
            IMigrationGenerator generator,
            IAnnouncer announcer,
            [NotNull] IMigrationProcessorOptions options)
        {
            Generator = generator;
            Announcer = announcer;
            Logger    = new AnnouncerFluentMigratorLogger(announcer);
            Options   = options as ProcessorOptions ?? new ProcessorOptions()
            {
                PreviewOnly      = options.PreviewOnly,
                ProviderSwitches = options.ProviderSwitches,
                Timeout          = options.Timeout == null ? null : (TimeSpan?)TimeSpan.FromSeconds(options.Timeout.Value),
            };

            _legacyOptions = options;
        }