private void UpdateCurrentProvider(string adapterName)
        {
            if (CurrentConfigurationProvider != null)
                CurrentConfigurationProvider.PropertyChanged -= UpdateContextConfiguration;

            CurrentConfigurationProvider = configurationProvidersSource(adapterName);

            if (CurrentConfigurationProvider != null)
            {
                SetTransferModelAdapterConfiguration(CurrentConfigurationProvider.Configuration);
                CurrentConfigurationProvider.PropertyChanged += UpdateContextConfiguration;
            }
            else
            {
                SetTransferModelAdapterConfiguration(null);
            }
        }
 private void OnTransferModelPropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     if (e.PropertyName == DataTransferModelProperties.SourceAdapterName)
     {
         generateCommandLine.SourceName = transferModel.SourceAdapterName;
         SourceAdapterDisplayName       = GetValueOrDefault(sourcesDisplayNames, transferModel.SourceAdapterName);
         generateCommandLine.SourceConfigurationProvider = SourceConfigurationProvider =
             configurationProviders.GetForSource(transferModel.SourceAdapterName);
     }
     else if (e.PropertyName == DataTransferModelProperties.SinkAdapterName)
     {
         generateCommandLine.SinkName = transferModel.SinkAdapterName;
         SinkAdapterDisplayName       = GetValueOrDefault(sinksDisplayNames, transferModel.SinkAdapterName);
         generateCommandLine.SinkConfigurationProvider = SinkConfigurationProvider =
             configurationProviders.GetForSink(transferModel.SinkAdapterName);
     }
 }
        private void UpdateCurrentProvider(string adapterName)
        {
            if (CurrentConfigurationProvider != null)
            {
                CurrentConfigurationProvider.PropertyChanged -= UpdateContextConfiguration;
            }

            CurrentConfigurationProvider = configurationProvidersSource(adapterName);

            if (CurrentConfigurationProvider != null)
            {
                SetTransferModelAdapterConfiguration(CurrentConfigurationProvider.Configuration);
                CurrentConfigurationProvider.PropertyChanged += UpdateContextConfiguration;
            }
            else
            {
                SetTransferModelAdapterConfiguration(null);
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// Creates a new instance of <see cref="DataAdapterConfigurationProviderWrapper" />.
 /// </summary>
 /// <param name="provider"></param>
 public DataAdapterConfigurationProviderWrapper(IDataAdapterConfigurationProvider provider)
 {
     Provider = provider;
 }
 private void OnTransferModelPropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     if (e.PropertyName == DataTransferModelProperties.InfrastructureConfiguration)
     {
         InfrastructureConfiguration = transferModel.InfrastructureConfiguration;
         generateCommandLine.InfrastructureConfiguration = transferModel.InfrastructureConfiguration;
     }
     else if (e.PropertyName == DataTransferModelProperties.SourceAdapterName)
     {
         generateCommandLine.SourceName = transferModel.SourceAdapterName;
         SourceAdapterDisplayName = GetValueOrDefault(sourcesDisplayNames, transferModel.SourceAdapterName);
         generateCommandLine.SourceConfigurationProvider = SourceConfigurationProvider = 
             configurationProviders.GetForSource(transferModel.SourceAdapterName);
     }
     else if (e.PropertyName == DataTransferModelProperties.SinkAdapterName)
     {
         generateCommandLine.SinkName = transferModel.SinkAdapterName;
         SinkAdapterDisplayName = GetValueOrDefault(sinksDisplayNames, transferModel.SinkAdapterName);
         generateCommandLine.SinkConfigurationProvider = SinkConfigurationProvider = 
             configurationProviders.GetForSink(transferModel.SinkAdapterName);
     }
 }
 /// <summary>
 /// Creates a new instance of <see cref="DataAdapterConfigurationProviderWrapper" />.
 /// </summary>
 /// <param name="provider"></param>
 public DataAdapterConfigurationProviderWrapper(IDataAdapterConfigurationProvider provider)
 {
     Provider = provider;
 }