public SummaryStep(IDataTransferService transferService, IDataAdapterConfigurationProvidersCollection configurationProviders,
                           ICommandLineProvider commandLineProvider, IDataTransferModel transferModel)
            : base(transferModel)
        {
            Guard.NotNull("transferService", transferService);
            Guard.NotNull("configurationProviders", configurationProviders);
            Guard.NotNull("transferModel", transferModel);

            this.transferService        = transferService;
            this.configurationProviders = configurationProviders;
            this.commandLineProvider    = commandLineProvider;

            transferModel.PropertyChanged += OnTransferModelPropertyChanged;
            OnTransferModelPropertyChanged(this, new PropertyChangedEventArgs(null));
        }
        public SummaryStep(IDataTransferService transferService, IDataAdapterConfigurationProvidersCollection configurationProviders,
            ICommandLineProvider commandLineProvider, IDataTransferModel transferModel)
                : base(transferModel)
        {
            Guard.NotNull("transferService", transferService);
            Guard.NotNull("configurationProviders", configurationProviders);
            Guard.NotNull("transferModel", transferModel);

            this.transferService = transferService;
            this.configurationProviders = configurationProviders;
            this.commandLineProvider = commandLineProvider;

            transferModel.PropertyChanged += OnTransferModelPropertyChanged;
            OnTransferModelPropertyChanged(this, new PropertyChangedEventArgs(null));
        }
        public SummaryPageViewModel(IReadOnlyDictionary<string, string> sourcesDisplayNames, IReadOnlyDictionary<string, string> sinksDisplayNames,
            IDataAdapterConfigurationProvidersCollection configurationProviders, ICommandLineProvider commandLineProvider, IDataTransferModel transferModel)
        {
            this.sourcesDisplayNames = sourcesDisplayNames;
            this.sinksDisplayNames = sinksDisplayNames;

            this.configurationProviders = configurationProviders;

            this.generateCommandLine = new GenerateCommandLineCommand(commandLineProvider);

            this.transferModel = transferModel;
            transferModel.PropertyChanged += OnTransferModelPropertyChanged;
            OnTransferModelPropertyChanged(this, new PropertyChangedEventArgs(DataTransferModelProperties.InfrastructureConfiguration));
            OnTransferModelPropertyChanged(this, new PropertyChangedEventArgs(DataTransferModelProperties.SourceAdapterName));
            OnTransferModelPropertyChanged(this, new PropertyChangedEventArgs(DataTransferModelProperties.SinkAdapterName));
        }
 public GenerateCommandLineCommand(ICommandLineProvider commandLineProvider)
 {
     this.commandLineProvider = commandLineProvider;
 }
Exemplo n.º 5
0
        public SummaryPageViewModel(IReadOnlyDictionary <string, string> sourcesDisplayNames, IReadOnlyDictionary <string, string> sinksDisplayNames,
                                    IDataAdapterConfigurationProvidersCollection configurationProviders, ICommandLineProvider commandLineProvider, IDataTransferModel transferModel)
        {
            this.sourcesDisplayNames = sourcesDisplayNames;
            this.sinksDisplayNames   = sinksDisplayNames;

            this.configurationProviders = configurationProviders;

            this.generateCommandLine = new GenerateCommandLineCommand(commandLineProvider);

            this.transferModel             = transferModel;
            transferModel.PropertyChanged += OnTransferModelPropertyChanged;
            OnTransferModelPropertyChanged(this, new PropertyChangedEventArgs(DataTransferModelProperties.InfrastructureConfiguration));
            OnTransferModelPropertyChanged(this, new PropertyChangedEventArgs(DataTransferModelProperties.SourceAdapterName));
            OnTransferModelPropertyChanged(this, new PropertyChangedEventArgs(DataTransferModelProperties.SinkAdapterName));
        }
 public GenerateCommandLineCommand(ICommandLineProvider commandLineProvider)
 {
     Guard.NotNull("commandLineProvider", commandLineProvider);
     this.commandLineProvider = commandLineProvider;
 }
Exemplo n.º 7
0
 /// <summary>
 /// Initializes command-line provider for the utility class. Yet this is not a perfect way to inverse control over CLI processing
 /// but it does its job for the testing purposes.
 /// </summary>
 /// <param name="provider">An instance of a command-line provider to initialize the utility with.</param>
 public static void SetDefaultCliProvider(ICommandLineProvider provider)
 {
     Debug.Assert(provider != null, "Command line provider is null");
     CliProvider = provider;
 }
Exemplo n.º 8
0
 /// <summary>
 /// Initializes command-line provider for the utility class. Yet this is not a perfect way to inverse control over CLI processing 
 /// but it does its job for the testing purposes.
 /// </summary>
 /// <param name="provider">An instance of a command-line provider to initialize the utility with.</param>
 public static void SetDefaultCliProvider(ICommandLineProvider provider)
 {
     Debug.Assert(provider != null, "Command line provider is null");
     CliProvider = provider;
 }