Created
March 19, 2016 17:28
-
-
Save dcomartin/4b6e7851d0994811382d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Envelope<T> : IAsyncRequest, IAsyncNotification | |
{ | |
public Envelope(Guid messageId, Guid correlationId, T message) | |
{ | |
MessageId = messageId; | |
CorrelationId = correlationId; | |
Body = message; | |
} | |
public Envelope(T message) : this(Guid.NewGuid(), Guid.NewGuid(), message) { } | |
public Envelope(Guid correlationId, T message) : this(Guid.NewGuid(), correlationId, message) { } | |
public T Body { get; } | |
public Guid MessageId { get; } | |
public Guid CorrelationId { get; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment