public CreateEventGeneric ( Type, openGeneric, Type, closingType ) : TEvent, | ||
openGeneric | Type, | |
closingType | Type, | |
return | TEvent, |
/// <inheritdoc /> public async Task Send(string destinationAddress, object explicitlyRoutedMessage, IDictionary <string, string> optionalHeaders = null) { var messageSentToDestination = _factory.CreateEventGeneric <MessageSentToDestination>( typeof(MessageSentToDestination <>), explicitlyRoutedMessage.GetType(), destinationAddress, explicitlyRoutedMessage, optionalHeaders, _rebusTime.Now ); _recorder.Record(messageSentToDestination); }
/// <inheritdoc /> public async Task Publish(string topic, object eventMessage, IDictionary <string, string> optionalHeaders = null) { var messagePublishedToTopicEvent = _factory.CreateEventGeneric <MessagePublishedToTopic>( typeof(MessagePublishedToTopic <>), eventMessage.GetType(), topic, eventMessage, optionalHeaders, _rebusTime.Now ); _recorder.Record(messagePublishedToTopicEvent); }
/// <inheritdoc /> public void SendLocal(object commandMessage, IDictionary <string, string> optionalHeaders = null) { var messageSentToSelfEvent = _factory.CreateEventGeneric <MessageSentToSelf>(typeof(MessageSentToSelf <>), commandMessage.GetType(), commandMessage, optionalHeaders, _rebusTime.Now); Record(messageSentToSelfEvent); }