A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://learn.microsoft.com/en-us/dotnet/api/azure.messaging.cloudevent below:

CloudEvent Class (Azure.Messaging) - Azure for .NET Developers

CloudEvent Class Definition

Represents a CloudEvent conforming to the 1.0 schema. This type has built-in serialization using System.Text.Json.

[System.Text.Json.Serialization.JsonConverter(typeof(Azure.Messaging.CloudEventConverter))]
public class CloudEvent
[<System.Text.Json.Serialization.JsonConverter(typeof(Azure.Messaging.CloudEventConverter))>]
type CloudEvent = class
Public Class CloudEvent
Inheritance
Attributes
Constructors Properties Data

Gets or sets the event data as BinaryData. Using BinaryData, one can deserialize the payload into rich data, or access the raw JSON data using ToString().

DataContentType

Gets or sets the content type of the data.

DataSchema

Gets or sets the schema that the data adheres to.

ExtensionAttributes

Gets extension attributes that can be additionally added to the CloudEvent envelope.

Id

Gets or sets an identifier for the event. The combination of Id and Source must be unique for each distinct event. If not explicitly set, this will default to a Guid.

Source

Gets or sets the context in which an event happened. The combination of Id and Source must be unique for each distinct event.

Subject

Gets or sets the subject of the event in the context of the event producer (identified by source).

Time

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.

Type

Gets or sets the type of event related to the originating occurrence.

Methods Parse(BinaryData, Boolean)

Given a single JSON-encoded event, parses the event envelope and returns a CloudEvent. If the specified event is not valid JSON an exception is thrown. By default, if the event is missing required properties, an exception is thrown though this can be relaxed by setting the skipValidation parameter.

ParseMany(BinaryData, Boolean)

Given JSON-encoded events, parses the event envelope and returns an array of CloudEvents. If the specified event is not valid JSON an exception is thrown. By default, if the event is missing required properties, an exception is thrown though this can be relaxed by setting the skipValidation parameter.

Collaborate with us on GitHub

The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide. In this article

Was this page helpful?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4