Skip to content

Instantly share code, notes, and snippets.

@JIntrocaso
Created January 24, 2022 23:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JIntrocaso/d88e8d74a6e597c48a96012660bebae7 to your computer and use it in GitHub Desktop.
Save JIntrocaso/d88e8d74a6e597c48a96012660bebae7 to your computer and use it in GitHub Desktop.
Message Classes
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; }
}
}
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