public YZXMessagingClient(string partner, YZXMessagesFactoryType messagetype = YZXMessagesFactoryType.Duplex) { Partner = partner; DSender = DSenderFactory.CreateDuplexTypedMessageSender <ResponseType, RequestType>(); anOutputChannel = UnderlyingMessaging.CreateDuplexOutputChannel(Partner); ConfigSender(); AttachOutputChannel(); }
public void AttachOutputChannel() { try { switch (MessagesFactoryType) { case YZXMessagesFactoryType.Duplex: if (DSender == null) { ConfigSender(); } else { if (DSender.IsDuplexOutputChannelAttached) { } else { try { anOutputChannel = UnderlyingMessaging.CreateDuplexOutputChannel(Partner); DSender.AttachDuplexOutputChannel(anOutputChannel); } catch (Exception ex) { Console.WriteLine(ex); } } } break; } } catch (Exception EX) { Console.WriteLine(EX); } }