/// <summary> /// Constructor /// </summary> /// <param name="settings">Set of options to use</param> /// <param name="collaborationProtocolRegistry">Reference to the collaboration protocol registry</param> /// <param name="addressRegistry">Reference to the address registry</param> public MessagingClient( MessagingSettings settings, ICollaborationProtocolRegistry collaborationProtocolRegistry, IAddressRegistry addressRegistry) : base(settings, collaborationProtocolRegistry, addressRegistry) { _asynchronousServiceBusSender = new AsynchronousSender(ServiceBus); _synchronousServiceBusSender = new SynchronousSender(ServiceBus); }
public MessagingClient( MessagingSettings settings, ICollaborationProtocolRegistry collaborationProtocolRegistry, IAddressRegistry addressRegistry, ICertificateStore certificateStore, ICertificateValidator certificateValidator, IMessageProtection messageProtection) : base(settings, collaborationProtocolRegistry, addressRegistry, certificateStore, certificateValidator, messageProtection) { _asynchronousServiceBusSender = new AsynchronousSender(ServiceBus); _synchronousServiceBusSender = new SynchronousSender(ServiceBus); }
/// <summary> /// Constructor /// </summary> /// <param name="settings">Set of options to use</param> /// <param name="loggerFactory"></param> /// <param name="collaborationProtocolRegistry">Reference to the collaboration protocol registry</param> /// <param name="addressRegistry">Reference to the address registry</param> public MessagingClient( MessagingSettings settings, ILoggerFactory loggerFactory, ICollaborationProtocolRegistry collaborationProtocolRegistry, IAddressRegistry addressRegistry) : base(settings, collaborationProtocolRegistry, addressRegistry) { _loggerFactory = loggerFactory ?? throw new ArgumentNullException(nameof(loggerFactory)); _logger = _loggerFactory.CreateLogger(nameof(MessagingClient)); _asynchronousServiceBusSender = new AsynchronousSender(ServiceBus); _synchronousServiceBusSender = new SynchronousSender(ServiceBus); }
//////////////////////////////////////////////////////////////////////////////////////////////////// /// \fn public bool IsSendingSocketConnected() /// /// \brief Query if this object is sending socket connected. /// /// \par Description. /// Check if the sending socket is still connected this is done /// In order to avoid sending to terminated process /// /// \par Algorithm. /// /// \par Usage Notes. /// /// \author Ilan Hindy /// \date 08/03/2017 /// /// \return True if sending socket connected, false if not. //////////////////////////////////////////////////////////////////////////////////////////////////// public bool IsSendingSocketConnected() { if (sendingSocket == null) { return(false); } else { return(AsynchronousSender.IsSocketConnected(sendingSocket)); } }