Class EventConverter
Converts a stream of JSON text using deserialisation.
Inheritance
System.Object
EventConverter
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Cqrs.EventStore.Bus
Assembly: Cqrs.EventStore.dll
Syntax
public class EventConverter
Methods
GetEventFromData<TEvent>(Byte[], String)
Assumes the provided eventData
is a strean of JSON text and
deserialises the provided eventData
into an object of type typeName
then casts to TEvent
.
Declaration
public static TEvent GetEventFromData<TEvent>(byte[] eventData, string typeName)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | eventData | A strean of JSON text |
System.String | typeName | The name of the System.Type to deserialise the provided |
Returns
Type | Description |
---|---|
TEvent |
Type Parameters
Name | Description |
---|---|
TEvent | The System.Type of the event to convert to. |