private void CreateNewConfig() { if (this.comboBoxChnType.SelectedItem == null) { return; } string chnType = this.comboBoxChnType.SelectedItem.ToString(); IChannelConfig cfg = ChannelFactory.CreateChannelConfig(chnType, Program.Log); if (cfg == null) { return; } ConfigurationInitializationParameter param = new ConfigurationInitializationParameter (Program.AppArgument.ConfigFilePath, Program.Log); if (!cfg.Initialize(param)) { return; } string cfgXml = ""; if (cfg.CreateConfig(this, out cfgXml)) { _Channel.Setting = cfgXml.ToString(); rtBoxSetting.Clear(); rtBoxSetting.Text = _Channel.Setting; } }
public async Task AddChannel(IChannelConfig config) { channels.Add( await provider.JoinChannel(config.ID), config ); }
public WcfBaseClient(IChannelConfig <T> channelConfig) { var channelFactory = new ChannelFactory <T>(channelConfig.GetBinding(), channelConfig.GetEndpointAddress()); channelConfig.SetCredentials(channelFactory.Credentials); channelFactory.Faulted += (sender, args) => { channelFactory.Abort(); try { Channel = channelFactory.CreateChannel(); } catch (Exception e) { Channel = null; } }; channelFactory.Endpoint.EndpointBehaviors.Add(new EndpointBehavior()); try { Channel = channelFactory.CreateChannel(); } catch (Exception e) { Channel = null; } }
public AbstractChannel(Socket socket) { _pipe = new DefaultChannelPipeline(this); _config = new DefaultChannelConfig(socket); _active = 0; }
public SignerBaseClient(IChannelConfig <TSPWebServiceSoap> channelConfig) : base(channelConfig) { }
public UdpCommunicationChannel(IUdpClientServer udpClientServer, IChannelConfig channelConfig) { _udpClientServer = udpClientServer; _channelConfig = channelConfig; }