ServiceBusMQ.SbmqSystem.SendCommand C# (CSharp) Method

SendCommand() public method

public SendCommand ( object>.Dictionary connectionStrings, string destinationQueue, object message ) : void
connectionStrings object>.Dictionary
destinationQueue string
message object
return void
    public void SendCommand(Dictionary<string, object> connectionStrings, string destinationQueue, object message) {
      var sc = _mgr as ISendCommand;
      if( sc != null ) {

        if( !_isServiceBusStarted ) {
          sc.SetupServiceBus(Config.CurrentServer.CommandsAssemblyPaths, Config.CurrentServer.CommandDefinition, Config.CurrentServer.ConnectionSettings);
          _isServiceBusStarted = true;
        }

        sc.SendCommand(connectionStrings, destinationQueue, message);

      } else throw new Exception("This Service Bus Adapter does not support sending Commands");
    }