Class EventPublisher
Provides the capability to publish events using the MassTransit transport.
Inheritance
Namespace: Copper.Eventing.MassTransit.Common.V1
Assembly: Copper.Eventing.MassTransit.Common.dll
Syntax
public class EventPublisher : IEventPublisher, IDisposable
Constructors
View SourceEventPublisher(IBusControlFactory, EventPublisherSettings, IClientMessageFormatter, IOptions<EventPublisherOptions>)
Initializes a new instance of the EventPublisher class.
Declaration
public EventPublisher(IBusControlFactory busControlFactory, EventPublisherSettings eventPublisherSettings, IClientMessageFormatter clientMessageFormatter, IOptions<EventPublisherOptions> options)
Parameters
Type | Name | Description |
---|---|---|
IBusControlFactory | busControlFactory | The bus control factory. |
EventPublisherSettings | eventPublisherSettings | The event publisher settings. |
IClientMessageFormatter | clientMessageFormatter | The client message formatter. |
IOptions<EventPublisherOptions> | options | The event publisher options. |
Properties
View SourceIsFaulted
Gets a value indicating whether this instance is faulted.
Declaration
public bool IsFaulted { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Methods
View SourceDispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(Boolean)
Releases unmanaged and - optionally - managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
|
Publish(MethodInfo, Object[])
Publishes an event.
Declaration
public async Task Publish(MethodInfo methodInfo, object[] arguments)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MethodInfo | methodInfo | The method information of the event to be published. |
System.Object[] | arguments | The arguments of the event to be published. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task that represents outstanding operation. |