diff --git a/README.md b/README.md index 8c44b1c..de12aa0 100644 --- a/README.md +++ b/README.md @@ -224,14 +224,14 @@ var cloudEvent = await HttpContext.Request.ReadCloudEventAsync(); ### HTTP - ASP.NET Core MVC If you would like to deserialize CloudEvents in actions directly, you can register the -`CloudEventInputFormatter` in the MVC options: +`CloudEventJsonInputFormatter` in the MVC options: ```C# public void ConfigureServices(IServiceCollection services) { services.AddMvc(opts => { - opts.InputFormatters.Insert(0, new CloudEventInputFormatter()); + opts.InputFormatters.Insert(0, new CloudEventJsonInputFormatter()); }); } ``` diff --git a/samples/CloudNative.CloudEvents.AspNetCoreSample/Startup.cs b/samples/CloudNative.CloudEvents.AspNetCoreSample/Startup.cs index db3eb1f..567c52e 100644 --- a/samples/CloudNative.CloudEvents.AspNetCoreSample/Startup.cs +++ b/samples/CloudNative.CloudEvents.AspNetCoreSample/Startup.cs @@ -25,7 +25,7 @@ namespace CloudNative.CloudEvents.AspNetCoreSample { services.AddControllers(opts => { - opts.InputFormatters.Insert(0, new CloudEventInputFormatter()); + opts.InputFormatters.Insert(0, new CloudEventJsonInputFormatter()); }); } diff --git a/src/CloudNative.CloudEvents.AspNetCore/CloudEventInputFormatter.cs b/src/CloudNative.CloudEvents.AspNetCore/CloudEventJsonInputFormatter.cs similarity index 93% rename from src/CloudNative.CloudEvents.AspNetCore/CloudEventInputFormatter.cs rename to src/CloudNative.CloudEvents.AspNetCore/CloudEventJsonInputFormatter.cs index d7607dc..e160aa7 100644 --- a/src/CloudNative.CloudEvents.AspNetCore/CloudEventInputFormatter.cs +++ b/src/CloudNative.CloudEvents.AspNetCore/CloudEventJsonInputFormatter.cs @@ -10,9 +10,9 @@ namespace CloudNative.CloudEvents using Microsoft.AspNetCore.Mvc.Formatters; using Microsoft.Net.Http.Headers; - public class CloudEventInputFormatter : TextInputFormatter + public class CloudEventJsonInputFormatter : TextInputFormatter { - public CloudEventInputFormatter() + public CloudEventJsonInputFormatter() { SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse("application/json")); SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse("application/cloudevents")); diff --git a/test/CloudNative.CloudEvents.IntegrationTests/CloudNative.CloudEvents.IntegrationTests.csproj b/test/CloudNative.CloudEvents.IntegrationTests/CloudNative.CloudEvents.IntegrationTests.csproj index 0a32970..4eca15e 100644 --- a/test/CloudNative.CloudEvents.IntegrationTests/CloudNative.CloudEvents.IntegrationTests.csproj +++ b/test/CloudNative.CloudEvents.IntegrationTests/CloudNative.CloudEvents.IntegrationTests.csproj @@ -6,7 +6,6 @@ -