Class CqrsEventApiController<TSingleSignOnToken>
A CqrsApiController that includes an implementation of the GetEventData(IServiceRequestWithData<TAuthenticationToken, Guid>) method
Inheritance
Inherited Members
Namespace: Cqrs.WebApi
Assembly: Cqrs.WebApi.dll
Syntax
public abstract class CqrsEventApiController<TSingleSignOnToken> : CqrsApiController, IHttpController, IDisposable, IEventService<TSingleSignOnToken> where TSingleSignOnToken : ISingleSignOnToken, new ()
Type Parameters
Name | Description |
---|---|
TSingleSignOnToken |
Constructors
CqrsEventApiController(ILogger, ICorrelationIdHelper, IAuthenticationTokenHelper<TSingleSignOnToken>, IEventStore<TSingleSignOnToken>, IConfigurationManager)
Instantiates a new instance of CqrsEventApiController<TSingleSignOnToken>.
Declaration
protected CqrsEventApiController(ILogger logger, ICorrelationIdHelper correlationIdHelper, IAuthenticationTokenHelper<TSingleSignOnToken> authenticationTokenHelper, IEventStore<TSingleSignOnToken> eventStore, IConfigurationManager configurationManager)
Parameters
Type | Name | Description |
---|---|---|
cdmdotnet.Logging.ILogger | logger | |
cdmdotnet.Logging.ICorrelationIdHelper | correlationIdHelper | |
IAuthenticationTokenHelper<TSingleSignOnToken> | authenticationTokenHelper | |
IEventStore<TSingleSignOnToken> | eventStore | |
IConfigurationManager | configurationManager |
Properties
AuthenticationTokenHelper
Gets or set the IAuthenticationTokenHelper<TAuthenticationToken>.
Declaration
protected IAuthenticationTokenHelper<TSingleSignOnToken> AuthenticationTokenHelper { get; }
Property Value
Type | Description |
---|---|
IAuthenticationTokenHelper<TSingleSignOnToken> |
EventStore
Gets or set the IEventStore<TAuthenticationToken>.
Declaration
protected virtual IEventStore<TSingleSignOnToken> EventStore { get; }
Property Value
Type | Description |
---|---|
IEventStore<TSingleSignOnToken> |
Methods
GetEventData(IServiceRequestWithData<TSingleSignOnToken, Guid>)
Get all IEvent<TAuthenticationToken> raised with the same CorrelationId.
Declaration
protected virtual IServiceResponseWithResultData<IEnumerable<EventData>> GetEventData(IServiceRequestWithData<TSingleSignOnToken, Guid> serviceRequest)
Parameters
Type | Name | Description |
---|---|---|
IServiceRequestWithData<TSingleSignOnToken, System.Guid> | serviceRequest | The CorrelationId of the IEvent<TAuthenticationToken> to find. |
Returns
Type | Description |
---|---|
IServiceResponseWithResultData<System.Collections.Generic.IEnumerable<EventData>> | A collection of EventData |
OnGetEventData(IServiceRequestWithData<TSingleSignOnToken, Guid>)
Executed before calling the Get(Type, Guid, Boolean, Int32) method on EventStore in GetEventData(IServiceRequestWithData<TSingleSignOnToken, Guid>).
Declaration
protected virtual void OnGetEventData(IServiceRequestWithData<TSingleSignOnToken, Guid> serviceRequest)
Parameters
Type | Name | Description |
---|---|---|
IServiceRequestWithData<TSingleSignOnToken, System.Guid> | serviceRequest | The original IServiceRequestWithData<TAuthenticationToken, TData>. |
OnGotEventData(IServiceRequestWithData<TSingleSignOnToken, Guid>, IEnumerable<EventData>)
Executed after calling the Get(Type, Guid, Boolean, Int32) method on EventStore in GetEventData(IServiceRequestWithData<TSingleSignOnToken, Guid>).
Declaration
protected virtual IEnumerable<EventData> OnGotEventData(IServiceRequestWithData<TSingleSignOnToken, Guid> serviceRequest, IEnumerable<EventData> results)
Parameters
Type | Name | Description |
---|---|---|
IServiceRequestWithData<TSingleSignOnToken, System.Guid> | serviceRequest | The original IServiceRequestWithData<TAuthenticationToken, TData>. |
System.Collections.Generic.IEnumerable<EventData> | results | The collection of IEvent<TAuthenticationToken> from the EventStore. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<EventData> |
Explicit Interface Implementations
IEventService<TSingleSignOnToken>.GetEventData(IServiceRequestWithData<TSingleSignOnToken, Guid>)
Get all IEvent<TAuthenticationToken> raised with the same CorrelationId.
Declaration
IServiceResponseWithResultData<IEnumerable<EventData>> IEventService<TSingleSignOnToken>.GetEventData(IServiceRequestWithData<TSingleSignOnToken, Guid> serviceRequest)
Parameters
Type | Name | Description |
---|---|---|
IServiceRequestWithData<TSingleSignOnToken, System.Guid> | serviceRequest | The CorrelationId of the IEvent<TAuthenticationToken> to find. |
Returns
Type | Description |
---|---|
IServiceResponseWithResultData<System.Collections.Generic.IEnumerable<EventData>> | A collection of EventData |