Skip to content

Instantly share code, notes, and snippets.

@dbarkol
Last active May 6, 2018 15:33
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 dbarkol/475136b1d9162ea7fec6425741bef8ed to your computer and use it in GitHub Desktop.
Save dbarkol/475136b1d9162ea7fec6425741bef8ed to your computer and use it in GitHub Desktop.
using Newtonsoft.Json;
namespace CloudEventSample.Models
{
public class CloudEvent<T> where T : class
{
[JsonProperty("eventID")]
public string EventId { get; set; }
[JsonProperty("cloudEventsVersion")]
public string CloudEventVersion { get; set; }
[JsonProperty("eventType")]
public string EventType { get; set; }
[JsonProperty("eventTypeVersion")]
public string EventTypeVersion { get; set; }
[JsonProperty("source")]
public string Source { get; set; }
[JsonProperty("eventTime")]
public string EventTime { get; set; }
[JsonProperty("data")]
public T Data { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment