Interface IMessageSerialiser<TAuthenticationToken>
Serialises IEvent<TAuthenticationToken> and ICommand<TAuthenticationToken>.
Namespace: Cqrs.Azure.ServiceBus
Assembly: Cqrs.Azure.ServiceBus.dll
Syntax
public interface IMessageSerialiser<TAuthenticationToken>
Type Parameters
Name | Description |
---|---|
TAuthenticationToken | The |
Methods
DeserialiseCommand(String)
Deserialise the provided command
from its
Declaration
ICommand<TAuthenticationToken> DeserialiseCommand(string command)
Parameters
Type | Name | Description |
---|---|---|
System.String | command | A |
Returns
Type | Description |
---|---|
ICommand<TAuthenticationToken> |
DeserialiseEvent(String)
Deserialise the provided event
from its
Declaration
IEvent<TAuthenticationToken> DeserialiseEvent(string event)
Parameters
Type | Name | Description |
---|---|---|
System.String | event | A |
Returns
Type | Description |
---|---|
IEvent<TAuthenticationToken> |
SerialiseCommand<TCommand>(TCommand)
Serialise the provided command
.
Declaration
string SerialiseCommand<TCommand>(TCommand command)where TCommand : ICommand<TAuthenticationToken>
Parameters
Type | Name | Description |
---|---|---|
TCommand | command | The ICommand<TAuthenticationToken> being serialised. |
Returns
Type | Description |
---|---|
System.String | A |
Type Parameters
Name | Description |
---|---|
TCommand | The |
SerialiseEvent<TEvent>(TEvent)
Serialise the provided event
.
Declaration
string SerialiseEvent<TEvent>(TEvent event)where TEvent : IEvent<TAuthenticationToken>
Parameters
Type | Name | Description |
---|---|---|
TEvent | event | The IEvent<TAuthenticationToken> being serialised. |
Returns
Type | Description |
---|---|
System.String | A |
Type Parameters
Name | Description |
---|---|
TEvent | The |