CloudNative.CloudEvents.AspNetCore
2.9.0
dotnet add package CloudNative.CloudEvents.AspNetCore --version 2.9.0
NuGet\Install-Package CloudNative.CloudEvents.AspNetCore -Version 2.9.0
<PackageReference Include="CloudNative.CloudEvents.AspNetCore" Version="2.9.0" />
<PackageVersion Include="CloudNative.CloudEvents.AspNetCore" Version="2.9.0" />
<PackageReference Include="CloudNative.CloudEvents.AspNetCore" />
paket add CloudNative.CloudEvents.AspNetCore --version 2.9.0
#r "nuget: CloudNative.CloudEvents.AspNetCore, 2.9.0"
#:package CloudNative.CloudEvents.AspNetCore@2.9.0
#addin nuget:?package=CloudNative.CloudEvents.AspNetCore&version=2.9.0
#tool nuget:?package=CloudNative.CloudEvents.AspNetCore&version=2.9.0
About
This package provides a protocol binding for transporting CloudEvents with ASP.NET Core request and response types; for an overview of protocol bindings and their types in this SDK, see the Protocol bindings section of the user guide.
How to Use
Use this package with a formatter in an ASP.NET Core endpoint to read a CloudEvent from the request and write one to the response:
using CloudNative.CloudEvents;
using CloudNative.CloudEvents.AspNetCore;
using CloudNative.CloudEvents.SystemTextJson;
using Microsoft.AspNetCore.Http;
app.MapPost("/events", async (HttpRequest request, HttpResponse response) =>
{
var formatter = new JsonEventFormatter();
var cloudEvent = await request.ToCloudEventAsync(formatter);
var result = new CloudEvent
{
Id = Guid.NewGuid().ToString(),
Source = new Uri("https://example.com/processed"),
Type = "com.example.event.processed",
DataContentType = "application/json",
Data = new { OriginalId = cloudEvent.Id }
};
await result.CopyToHttpResponseAsync(response, ContentMode.Structured, formatter);
});
For more examples, see Samples.
Additional Documentation
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- CloudNative.CloudEvents (>= 2.9.0)
- Microsoft.AspNetCore.Http (>= 2.3.11)
- System.Text.Encodings.Web (>= 10.0.9)
-
net10.0
- CloudNative.CloudEvents (>= 2.9.0)
-
net8.0
- CloudNative.CloudEvents (>= 2.9.0)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on CloudNative.CloudEvents.AspNetCore:
| Package | Downloads |
|---|---|
|
Google.Cloud.Functions.Framework
Google Cloud Functions Framework |
|
|
Weikio.EventFramework.AspNetCore
Event Framework with ASP.NET Core made easy. Event Framework is a CloudEvents router and gateway for .NET. |
|
|
Weikio.EventFramework.EventGateway.HTTP
HTTP Cloud Event Gateway for .NET. |
|
|
xSdk.Extensions.CloudEvents
xSdk.Extensions.CloudEvents - CloudEvents extensions for the xSdk project. |
|
|
OpenFunction.Framework
OpenFunction Framework |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.9.0 | 152,203 | 7/4/2026 |
| 2.8.0 | 1,351,599 | 8/7/2024 |
| 2.7.1 | 1,043,595 | 9/4/2023 |
| 2.7.0 | 33,381 | 7/31/2023 |
| 2.6.0 | 494,325 | 3/7/2023 |
| 2.5.1 | 2,718,397 | 11/10/2022 |
| 2.5.0 | 2,378,617 | 10/17/2022 |
| 2.4.0 | 83,570 | 9/8/2022 |
| 2.3.1 | 59,046 | 6/29/2022 |
| 2.3.0 | 88,990 | 5/31/2022 |
| 2.2.0 | 162,316 | 2/2/2022 |
| 2.1.1 | 748,210 | 7/21/2021 |
| 2.1.0 | 11,620 | 7/14/2021 |
| 2.0.0 | 3,036,538 | 6/15/2021 |
| 2.0.0-rc.1 | 4,022 | 6/7/2021 |
| 2.0.0-beta.3 | 488 | 5/12/2021 |
| 2.0.0-beta.2 | 432 | 5/5/2021 |
| 2.0.0-beta.1 | 126,028 | 11/11/2020 |
| 1.3.80 | 3,999,019 | 1/16/2020 |
| 1.0.71 | 1,716 | 11/21/2019 |