public ConnectionsControl() { InitializeComponent(); var providerNames = Program.Plugins.Select(p => p.ProviderName).OrderBy(p => p); providerNames.ForEach(x => cmbSourceConnectionType.Items.Add(x)); providerNames.ForEach(x => cmbDestinationConnectionType.Items.Add(x)); if (Program.Configuration.SourceConnection != null) { var plugin = Program.Plugins.SingleOrDefault(p => p.ProviderName == Program.Configuration.SourceConnection.ProviderName); this.sourceConnectionControl = plugin.ConnectionControl; sourceConnectionControl.ConnectionDetails = Program.Configuration.SourceConnection; LoadSourceConnectionControl(); cmbSourceConnectionType.SelectedIndexChanged -= new System.EventHandler(this.cmbSourceConnectionType_SelectedIndexChanged); cmbSourceConnectionType.Text = plugin.ProviderName; cmbSourceConnectionType.SelectedIndexChanged += new System.EventHandler(this.cmbSourceConnectionType_SelectedIndexChanged); } if (Program.Configuration.DestinationConnection != null) { var plugin = Program.Plugins.SingleOrDefault(p => p.ProviderName == Program.Configuration.DestinationConnection.ProviderName); this.destinationConnectionControl = plugin.ConnectionControl; destinationConnectionControl.ConnectionDetails = Program.Configuration.DestinationConnection; LoadDestinationConnectionControl(); cmbDestinationConnectionType.SelectedIndexChanged -= new System.EventHandler(this.cmbDestinationConnectionType_SelectedIndexChanged); cmbDestinationConnectionType.Text = plugin.ProviderName; cmbDestinationConnectionType.SelectedIndexChanged -= new System.EventHandler(this.cmbDestinationConnectionType_SelectedIndexChanged); } }
public RpcClient(IPEndPoint endPoint) { EndPoint = endPoint; Interceptor = new RpcInterceptor(this); _resolver = new RpcClientResolver(this); _callbackResolver = new RpcCallbackResolver(this); _connectionControl = Import <IConnectionControl>(); }
public ConnectionsControl() { InitializeComponent(); var providerNames = Program.DataProviderPlugins.Select(p => p.ProviderName).OrderBy(p => p); cmbConnectionType.Items.AddRange(providerNames.ToArray()); if (Program.Configuration.Connection != null) { var plugin = Program.DataProviderPlugins.SingleOrDefault(p => p.ProviderName == Program.Configuration.Connection.ProviderName); this.connectionControl = plugin.ConnectionControl; connectionControl.ConnectionDetails = Program.Configuration.Connection; LoadConnectionControl(); cmbConnectionType.SelectedIndexChanged -= new System.EventHandler(this.cmbConnectionType_SelectedIndexChanged); cmbConnectionType.Text = plugin.ProviderName; cmbConnectionType.SelectedIndexChanged += new System.EventHandler(this.cmbConnectionType_SelectedIndexChanged); } }
private void cmbConnectionType_SelectedIndexChanged(object sender, System.EventArgs e) { connectionControl = Controller.GetConnectionControl(ConnectionType); LoadConnectionControl(); }
public BufferSizeControl(long maxSize, IConnectionControl connectionControl, KestrelThread connectionThread) { _maxSize = maxSize; _connectionControl = connectionControl; _connectionThread = connectionThread; }