Skip to content

Commit

Permalink
Clean up docs (Azure#17342)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshLove-msft authored and annelo-msft committed Feb 17, 2021
1 parent a370951 commit e350bcb
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,39 +99,45 @@ internal CloudEvent(string id, string source, string type, DateTimeOffset? time,
ExtensionAttributes = new Dictionary<string, object>();
}

/// <summary> An identifier for the event. The combination of id and source must be unique for each distinct event. </summary>
/// <summary>
/// Gets or sets an identifier for the event. The combination of <see cref="Id"/> and <see cref="Source"/> must be unique for each distinct event.
/// If not explicitly set, this will default to a <see cref="Guid"/>.
/// </summary>
public string Id { get; set; } = Guid.NewGuid().ToString();

/// <summary> Identifies the context in which an event happened. The combination of id and source must be unique for each distinct event. </summary>
/// <summary>Gets or sets the context in which an event happened. The combination of <see cref="Id"/> and <see cref="Source"/> must be unique for each distinct event.</summary>
public string Source { get; set; }

/// <summary> Type of event related to the originating occurrence. </summary>
/// <summary>Gets or sets the type of event related to the originating occurrence.</summary>
public string Type { get; set; }

/// <summary> The time (in UTC) the event was generated, in RFC3339 format. </summary>
/// <summary>
/// Gets or sets the time (in UTC) the event was generated, in RFC3339 format.
/// If not explicitly set, this will default to the time that the event is constructed.
/// </summary>
public DateTimeOffset? Time { get; set; } = DateTimeOffset.UtcNow;

/// <summary> Identifies the schema that data adheres to. </summary>
/// <summary>Gets or sets the schema that the data adheres to.</summary>
public string DataSchema { get; set; }

/// <summary> Content type of data value. </summary>
/// <summary>Gets or sets the content type of the data.</summary>
public string DataContentType { get; set; }

/// <summary> This describes the subject of the event in the context of the event producer (identified by source). </summary>
/// <summary>Gets or sets the subject of the event in the context of the event producer (identified by source). </summary>
public string Subject { get; set; }

/// <summary>
/// Extension attributes that can be additionally added to the CloudEvent envelope.
/// Gets extension attributes that can be additionally added to the CloudEvent envelope.
/// </summary>
public Dictionary<string, object> ExtensionAttributes { get; }

/// <summary> Deserialized event data specific to the event type. </summary>
/// <summary>Gets or sets the deserialized event data specific to the event type.</summary>
internal object Data { get; set; }

/// <summary> Serialized event data specific to the event type. </summary>
/// <summary>Gets or sets the serialized event data specific to the event type.</summary>
internal JsonElement SerializedData { get; set; }

/// <summary> Event data specific to the event type, encoded as a base64 string. </summary>
/// <summary>Gets or sets the event data specific to the event type, encoded as a base64 string.</summary>
internal byte[] DataBase64 { get; set; }

private static readonly JsonObjectSerializer s_jsonSerializer = new JsonObjectSerializer();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,28 +51,30 @@ internal EventGridEvent(JsonElement serializedData, string subject, string event
Id = id;
}

/// <summary> An unique identifier for the event. </summary>
/// <summary> Gets or sets a unique identifier for the event. </summary>
public string Id { get; set; } = Guid.NewGuid().ToString();

/// <summary> The resource path of the event source. </summary>
/// <summary>Gets or sets the resource path of the event source.
/// This must be set when publishing the event to a domain, and must not be set when publishing the event to a topic.
/// </summary>
public string Topic { get; set; }

/// <summary> A resource path relative to the topic path. </summary>
/// <summary>Gets or sets a resource path relative to the topic path.</summary>
public string Subject { get; set; }

/// <summary> The type of the event that occurred. </summary>
/// <summary>Gets or sets the type of the event that occurred.</summary>
public string EventType { get; set; }

/// <summary> The time (in UTC) the event was generated. </summary>
/// <summary>Gets or sets the time (in UTC) the event was generated.</summary>
public DateTimeOffset EventTime { get; set; } = DateTimeOffset.UtcNow;

/// <summary> The schema version of the data object. </summary>
/// <summary>Gets or sets the schema version of the data object.</summary>
public string DataVersion { get; set; }

/// <summary> Event data specific to the event type. </summary>
/// <summary>Gets or sets the event data specific to the event type.</summary>
internal object Data { get; set; }

/// <summary> Serialized event data specific to the event type. </summary>
/// <summary>Gets or sets the serialized event data specific to the event type.</summary>
internal JsonElement SerializedData { get; set; }

private static readonly JsonObjectSerializer s_jsonSerializer = new JsonObjectSerializer();
Expand Down

0 comments on commit e350bcb

Please sign in to comment.