Created
January 24, 2022 23:55
-
-
Save JIntrocaso/d88e8d74a6e597c48a96012660bebae7 to your computer and use it in GitHub Desktop.
Message Classes
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
using System.Text.Json.Serialization; | |
namespace Receiver.Models | |
{ | |
public class Notification | |
{ | |
public Guid MessageId { get; set; } | |
public DateTime Timestamp { get; set; } | |
public string Sender { get; set; } = "None Sent"; | |
public string Event { get; set; } = string.Empty; | |
[JsonExtensionData] | |
public Dictionary<string, object>? Properties { get; set; } | |
} | |
} |
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
namespace Sender.Models | |
{ | |
public class PublishMessage | |
{ | |
public Guid MessageId { get; set; } = Guid.NewGuid(); | |
public DateTime Timestamp { get; set; } | |
public string Service { get; set; } = "DataService"; | |
public string Event { get; set; } = string.Empty; | |
public string SenderName { get; set; } = "Jamie"; | |
public object Payload { get; set; } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment