Пример #1
0
 /// <summary>
 /// Instantiates a message of type T and publishes it.
 /// </summary>
 /// <typeparam name="T">The type of message, usually an interface.</typeparam>
 /// <param name="messageConstructor">An action which initializes properties of the message.</param>
 /// <param name="publishOptions">Specific options for this event.</param>
 public Task Publish <T>(Action <T> messageConstructor, PublishOptions publishOptions)
 {
     return(BusOperations.Publish(this, messageConstructor, publishOptions));
 }
Пример #2
0
 /// <summary>
 /// Subscribes to receive published messages of the specified type.
 /// This method is only necessary if you turned off auto-subscribe.
 /// </summary>
 /// <param name="eventType">The type of event to subscribe to.</param>
 /// <param name="options">Options for the subscribe.</param>
 public Task Subscribe(Type eventType, SubscribeOptions options)
 {
     return(BusOperations.Subscribe(this, eventType, options));
 }
Пример #3
0
 /// <summary>
 ///  Publish the message to subscribers.
 /// </summary>
 /// <param name="message">The message to publish.</param>
 /// <param name="options">The options for the publish.</param>
 public Task Publish(object message, PublishOptions options)
 {
     return(BusOperations.Publish(this, message, options));
 }
Пример #4
0
 /// <summary>
 /// Instantiates a message of type T and sends it.
 /// </summary>
 /// <typeparam name="T">The type of message, usually an interface.</typeparam>
 /// <param name="messageConstructor">An action which initializes properties of the message.</param>
 /// <param name="options">The options for the send.</param>
 public Task Send <T>(Action <T> messageConstructor, SendOptions options)
 {
     return(BusOperations.Send(this, messageConstructor, options));
 }
Пример #5
0
 /// <summary>
 /// Sends the provided message.
 /// </summary>
 /// <param name="message">The message to send.</param>
 /// <param name="options">The options for the send.</param>
 public Task Send(object message, SendOptions options)
 {
     return(BusOperations.Send(this, message, options));
 }
Пример #6
0
 ///  <summary>
 /// Instantiates a message of type T and performs a regular <see cref="Reply"/>.
 /// </summary>
 /// <typeparam name="T">The type of message, usually an interface.</typeparam>
 /// <param name="messageConstructor">An action which initializes properties of the message.</param>
 /// <param name="options">Options for this reply.</param>
 public Task Reply <T>(Action <T> messageConstructor, ReplyOptions options)
 {
     return(BusOperations.Reply(this, messageConstructor, options));
 }
Пример #7
0
 /// <summary>
 /// Sends the message to the endpoint which sent the message currently being handled.
 /// </summary>
 /// <param name="message">The message to send.</param>
 /// <param name="options">Options for this reply.</param>
 public Task Reply(object message, ReplyOptions options)
 {
     return(BusOperations.Reply(this, message, options));
 }