Ejemplo n.º 1
0
 /// <summary>
 /// Publishes (queues) an <see cref="EventData"/> instance using the specified <see cref="EventMetadata.Key"/>.
 /// </summary>
 /// <typeventPublisheraram name="T">The value <see cref="Type"/>.</typeventPublisheraram>
 /// <param name="eventPublisher">The <see cref="IEventPublisher"/>.</param>
 /// <param name="value">The event value</param>
 /// <param name="source">The event source.</param>
 /// <param name="subject">The event subject.</param>
 /// <param name="action">The event action.</param>
 /// <param name="key">The event key.</param>
 /// <returns>The <see cref="IEventPublisher"/> for fluent-style method-chaining.</returns>
 public static IEventPublisher PublishValue <T>(this IEventPublisher eventPublisher, T value, Uri source, string subject, string?action = null, params IComparable?[] key) => eventPublisher.Publish(eventPublisher.CreateValueEvent(value, source, subject, action, key));
Ejemplo n.º 2
0
 /// <summary>
 /// Publishes (queues) an <see cref="EventData"/> instance using the <paramref name="value"/> (infers <see cref="EventMetadata.Key"/>).
 /// </summary>
 /// <typeventPublisheraram name="T">The value <see cref="Type"/>.</typeventPublisheraram>
 /// <param name="eventPublisher">The <see cref="IEventPublisher"/>.</param>
 /// <param name="value">The event value</param>
 /// <param name="source">The event source.</param>
 /// <param name="subject">The event subject.</param>
 /// <param name="action">The event action.</param>
 /// <returns>The <see cref="IEventPublisher"/> for fluent-style method-chaining.</returns>
 public static IEventPublisher PublishValue <T>(this IEventPublisher eventPublisher, T value, Uri source, string subject, string?action = null) where T : class => eventPublisher.Publish(eventPublisher.CreateValueEvent(value, source, subject, action));