diff --git a/.vscode/launch.json b/.vscode/launch.json index e83dd3d..715191f 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,9 +1,15 @@ { - // Use IntelliSense to find out which attributes exist for C# debugging - // Use hover for the description of the existing attributes - // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md - "version": "0.2.0", - "configurations": [ + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md + "version": "0.2.0", + "configurations": [ + { + "name": "ASP.NET Core Sample Launch", + "type": "dotnet", + "request": "launch", + "projectPath": "${workspaceFolder}/samples/CloudNative.CloudEvents.AspNetCoreSample/CloudNative.CloudEvents.AspNetCoreSample.csproj" + }, { "name": ".NET Core Launch (console)", "type": "coreclr", @@ -24,5 +30,5 @@ "request": "attach", "processId": "${command:pickProcess}" } - ,] + ] } \ No newline at end of file diff --git a/CloudEvents.sln b/CloudEvents.sln deleted file mode 100644 index 530452a..0000000 --- a/CloudEvents.sln +++ /dev/null @@ -1,254 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.32112.339 -MinimumVisualStudioVersion = 15.0.26124.0 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CloudNative.CloudEvents", "src\CloudNative.CloudEvents\CloudNative.CloudEvents.csproj", "{C5DC9F44-7C03-4A70-80EF-7A29696455EB}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CloudNative.CloudEvents.UnitTests", "test\CloudNative.CloudEvents.UnitTests\CloudNative.CloudEvents.UnitTests.csproj", "{95215090-BDE3-4628-9261-64B91FBE4665}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3C6E118F-05CA-41BA-B21E-4E17863F5826}" - ProjectSection(SolutionItems) = preProject - .gitignore = .gitignore - appveyor.yml = appveyor.yml - LICENSE = LICENSE - README.md = README.md - EndProjectSection -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HttpSend", "samples\HttpSend\HttpSend.csproj", "{F1B9B769-DB6B-481F-905C-24FE3B12E00E}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CloudNative.CloudEvents.Mqtt", "src\CloudNative.CloudEvents.Mqtt\CloudNative.CloudEvents.Mqtt.csproj", "{FBF5EF1F-FBF7-4D3C-B309-3344C74714AF}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CloudNative.CloudEvents.Amqp", "src\CloudNative.CloudEvents.Amqp\CloudNative.CloudEvents.Amqp.csproj", "{39EF4DB0-9890-4CAD-A36E-F7E25D2E72EF}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CloudNative.CloudEvents.Kafka", "src\CloudNative.CloudEvents.Kafka\CloudNative.CloudEvents.Kafka.csproj", "{193D6D9D-C1A0-459E-86CF-F207CDF0FC73}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CloudNative.CloudEvents.AspNetCore", "src\CloudNative.CloudEvents.AspNetCore\CloudNative.CloudEvents.AspNetCore.csproj", "{C726DD78-2D56-48D3-928A-D10226E3750B}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CloudNative.CloudEvents.AspNetCoreSample", "samples\CloudNative.CloudEvents.AspNetCoreSample\CloudNative.CloudEvents.AspNetCoreSample.csproj", "{9760D744-D1BF-40E3-BD6F-7F639BFB9188}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CloudNative.CloudEvents.IntegrationTests", "test\CloudNative.CloudEvents.IntegrationTests\CloudNative.CloudEvents.IntegrationTests.csproj", "{9639E4FD-0438-4901-B57F-EFF773B19D5A}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CloudNative.CloudEvents.Avro", "src\CloudNative.CloudEvents.Avro\CloudNative.CloudEvents.Avro.csproj", "{E4BE54BF-F4D7-495F-9278-07E5A8C79935}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CloudNative.CloudEvents.NewtonsoftJson", "src\CloudNative.CloudEvents.NewtonsoftJson\CloudNative.CloudEvents.NewtonsoftJson.csproj", "{9DC17081-21D8-4123-8650-D97C2153DB8C}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CloudNative.CloudEvents.SystemTextJson", "src\CloudNative.CloudEvents.SystemTextJson\CloudNative.CloudEvents.SystemTextJson.csproj", "{FACB3EF2-F078-479A-A91C-719894CB66BF}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CloudNative.CloudEvents.Protobuf", "src\CloudNative.CloudEvents.Protobuf\CloudNative.CloudEvents.Protobuf.csproj", "{9D82AC2B-0075-4161-AE0E-4A6629C9FF2A}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "conformance", "conformance", "{8CCC98B3-1776-49FF-96D6-947A9E5DFB0A}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "format", "format", "{A5906FBA-D73A-4A09-8539-CB10D7B586AE}" - ProjectSection(SolutionItems) = preProject - conformance\format\README.md = conformance\format\README.md - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "json", "json", "{D8055631-E6BB-4CD2-8162-F674D6D30E76}" - ProjectSection(SolutionItems) = preProject - conformance\format\json\invalid-batches.json = conformance\format\json\invalid-batches.json - conformance\format\json\invalid-events.json = conformance\format\json\invalid-events.json - conformance\format\json\README.md = conformance\format\json\README.md - conformance\format\json\valid-batches.json = conformance\format\json\valid-batches.json - conformance\format\json\valid-events.json = conformance\format\json\valid-events.json - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "protobuf", "protobuf", "{119AD438-878B-4383-BC9F-779F1605E711}" - ProjectSection(SolutionItems) = preProject - conformance\format\protobuf\conformance_tests.proto = conformance\format\protobuf\conformance_tests.proto - conformance\format\protobuf\invalid-batches.json = conformance\format\protobuf\invalid-batches.json - conformance\format\protobuf\invalid-events.json = conformance\format\protobuf\invalid-events.json - conformance\format\protobuf\README.md = conformance\format\protobuf\README.md - conformance\format\protobuf\valid-batches.json = conformance\format\protobuf\valid-batches.json - conformance\format\protobuf\valid-events.json = conformance\format\protobuf\valid-events.json - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "xml", "xml", "{4012C753-68DE-4737-936F-F5DBC485C51B}" - ProjectSection(SolutionItems) = preProject - conformance\format\xml\invalid-batches.xml = conformance\format\xml\invalid-batches.xml - conformance\format\xml\invalid-events.xml = conformance\format\xml\invalid-events.xml - conformance\format\xml\README.md = conformance\format\xml\README.md - conformance\format\xml\valid-batches.xml = conformance\format\xml\valid-batches.xml - conformance\format\xml\valid-events.xml = conformance\format\xml\valid-events.xml - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C5DC9F44-7C03-4A70-80EF-7A29696455EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C5DC9F44-7C03-4A70-80EF-7A29696455EB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C5DC9F44-7C03-4A70-80EF-7A29696455EB}.Debug|x64.ActiveCfg = Debug|Any CPU - {C5DC9F44-7C03-4A70-80EF-7A29696455EB}.Debug|x64.Build.0 = Debug|Any CPU - {C5DC9F44-7C03-4A70-80EF-7A29696455EB}.Debug|x86.ActiveCfg = Debug|Any CPU - {C5DC9F44-7C03-4A70-80EF-7A29696455EB}.Debug|x86.Build.0 = Debug|Any CPU - {C5DC9F44-7C03-4A70-80EF-7A29696455EB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C5DC9F44-7C03-4A70-80EF-7A29696455EB}.Release|Any CPU.Build.0 = Release|Any CPU - {C5DC9F44-7C03-4A70-80EF-7A29696455EB}.Release|x64.ActiveCfg = Release|Any CPU - {C5DC9F44-7C03-4A70-80EF-7A29696455EB}.Release|x64.Build.0 = Release|Any CPU - {C5DC9F44-7C03-4A70-80EF-7A29696455EB}.Release|x86.ActiveCfg = Release|Any CPU - {C5DC9F44-7C03-4A70-80EF-7A29696455EB}.Release|x86.Build.0 = Release|Any CPU - {95215090-BDE3-4628-9261-64B91FBE4665}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {95215090-BDE3-4628-9261-64B91FBE4665}.Debug|Any CPU.Build.0 = Debug|Any CPU - {95215090-BDE3-4628-9261-64B91FBE4665}.Debug|x64.ActiveCfg = Debug|Any CPU - {95215090-BDE3-4628-9261-64B91FBE4665}.Debug|x64.Build.0 = Debug|Any CPU - {95215090-BDE3-4628-9261-64B91FBE4665}.Debug|x86.ActiveCfg = Debug|Any CPU - {95215090-BDE3-4628-9261-64B91FBE4665}.Debug|x86.Build.0 = Debug|Any CPU - {95215090-BDE3-4628-9261-64B91FBE4665}.Release|Any CPU.ActiveCfg = Release|Any CPU - {95215090-BDE3-4628-9261-64B91FBE4665}.Release|Any CPU.Build.0 = Release|Any CPU - {95215090-BDE3-4628-9261-64B91FBE4665}.Release|x64.ActiveCfg = Release|Any CPU - {95215090-BDE3-4628-9261-64B91FBE4665}.Release|x64.Build.0 = Release|Any CPU - {95215090-BDE3-4628-9261-64B91FBE4665}.Release|x86.ActiveCfg = Release|Any CPU - {95215090-BDE3-4628-9261-64B91FBE4665}.Release|x86.Build.0 = Release|Any CPU - {F1B9B769-DB6B-481F-905C-24FE3B12E00E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F1B9B769-DB6B-481F-905C-24FE3B12E00E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F1B9B769-DB6B-481F-905C-24FE3B12E00E}.Debug|x64.ActiveCfg = Debug|Any CPU - {F1B9B769-DB6B-481F-905C-24FE3B12E00E}.Debug|x64.Build.0 = Debug|Any CPU - {F1B9B769-DB6B-481F-905C-24FE3B12E00E}.Debug|x86.ActiveCfg = Debug|Any CPU - {F1B9B769-DB6B-481F-905C-24FE3B12E00E}.Debug|x86.Build.0 = Debug|Any CPU - {F1B9B769-DB6B-481F-905C-24FE3B12E00E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F1B9B769-DB6B-481F-905C-24FE3B12E00E}.Release|Any CPU.Build.0 = Release|Any CPU - {F1B9B769-DB6B-481F-905C-24FE3B12E00E}.Release|x64.ActiveCfg = Release|Any CPU - {F1B9B769-DB6B-481F-905C-24FE3B12E00E}.Release|x64.Build.0 = Release|Any CPU - {F1B9B769-DB6B-481F-905C-24FE3B12E00E}.Release|x86.ActiveCfg = Release|Any CPU - {F1B9B769-DB6B-481F-905C-24FE3B12E00E}.Release|x86.Build.0 = Release|Any CPU - {FBF5EF1F-FBF7-4D3C-B309-3344C74714AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FBF5EF1F-FBF7-4D3C-B309-3344C74714AF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FBF5EF1F-FBF7-4D3C-B309-3344C74714AF}.Debug|x64.ActiveCfg = Debug|Any CPU - {FBF5EF1F-FBF7-4D3C-B309-3344C74714AF}.Debug|x64.Build.0 = Debug|Any CPU - {FBF5EF1F-FBF7-4D3C-B309-3344C74714AF}.Debug|x86.ActiveCfg = Debug|Any CPU - {FBF5EF1F-FBF7-4D3C-B309-3344C74714AF}.Debug|x86.Build.0 = Debug|Any CPU - {FBF5EF1F-FBF7-4D3C-B309-3344C74714AF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FBF5EF1F-FBF7-4D3C-B309-3344C74714AF}.Release|Any CPU.Build.0 = Release|Any CPU - {FBF5EF1F-FBF7-4D3C-B309-3344C74714AF}.Release|x64.ActiveCfg = Release|Any CPU - {FBF5EF1F-FBF7-4D3C-B309-3344C74714AF}.Release|x64.Build.0 = Release|Any CPU - {FBF5EF1F-FBF7-4D3C-B309-3344C74714AF}.Release|x86.ActiveCfg = Release|Any CPU - {FBF5EF1F-FBF7-4D3C-B309-3344C74714AF}.Release|x86.Build.0 = Release|Any CPU - {39EF4DB0-9890-4CAD-A36E-F7E25D2E72EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {39EF4DB0-9890-4CAD-A36E-F7E25D2E72EF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {39EF4DB0-9890-4CAD-A36E-F7E25D2E72EF}.Debug|x64.ActiveCfg = Debug|Any CPU - {39EF4DB0-9890-4CAD-A36E-F7E25D2E72EF}.Debug|x64.Build.0 = Debug|Any CPU - {39EF4DB0-9890-4CAD-A36E-F7E25D2E72EF}.Debug|x86.ActiveCfg = Debug|Any CPU - {39EF4DB0-9890-4CAD-A36E-F7E25D2E72EF}.Debug|x86.Build.0 = Debug|Any CPU - {39EF4DB0-9890-4CAD-A36E-F7E25D2E72EF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {39EF4DB0-9890-4CAD-A36E-F7E25D2E72EF}.Release|Any CPU.Build.0 = Release|Any CPU - {39EF4DB0-9890-4CAD-A36E-F7E25D2E72EF}.Release|x64.ActiveCfg = Release|Any CPU - {39EF4DB0-9890-4CAD-A36E-F7E25D2E72EF}.Release|x64.Build.0 = Release|Any CPU - {39EF4DB0-9890-4CAD-A36E-F7E25D2E72EF}.Release|x86.ActiveCfg = Release|Any CPU - {39EF4DB0-9890-4CAD-A36E-F7E25D2E72EF}.Release|x86.Build.0 = Release|Any CPU - {193D6D9D-C1A0-459E-86CF-F207CDF0FC73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {193D6D9D-C1A0-459E-86CF-F207CDF0FC73}.Debug|Any CPU.Build.0 = Debug|Any CPU - {193D6D9D-C1A0-459E-86CF-F207CDF0FC73}.Debug|x64.ActiveCfg = Debug|Any CPU - {193D6D9D-C1A0-459E-86CF-F207CDF0FC73}.Debug|x64.Build.0 = Debug|Any CPU - {193D6D9D-C1A0-459E-86CF-F207CDF0FC73}.Debug|x86.ActiveCfg = Debug|Any CPU - {193D6D9D-C1A0-459E-86CF-F207CDF0FC73}.Debug|x86.Build.0 = Debug|Any CPU - {193D6D9D-C1A0-459E-86CF-F207CDF0FC73}.Release|Any CPU.ActiveCfg = Release|Any CPU - {193D6D9D-C1A0-459E-86CF-F207CDF0FC73}.Release|Any CPU.Build.0 = Release|Any CPU - {193D6D9D-C1A0-459E-86CF-F207CDF0FC73}.Release|x64.ActiveCfg = Release|Any CPU - {193D6D9D-C1A0-459E-86CF-F207CDF0FC73}.Release|x64.Build.0 = Release|Any CPU - {193D6D9D-C1A0-459E-86CF-F207CDF0FC73}.Release|x86.ActiveCfg = Release|Any CPU - {193D6D9D-C1A0-459E-86CF-F207CDF0FC73}.Release|x86.Build.0 = Release|Any CPU - {C726DD78-2D56-48D3-928A-D10226E3750B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C726DD78-2D56-48D3-928A-D10226E3750B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C726DD78-2D56-48D3-928A-D10226E3750B}.Debug|x64.ActiveCfg = Debug|Any CPU - {C726DD78-2D56-48D3-928A-D10226E3750B}.Debug|x64.Build.0 = Debug|Any CPU - {C726DD78-2D56-48D3-928A-D10226E3750B}.Debug|x86.ActiveCfg = Debug|Any CPU - {C726DD78-2D56-48D3-928A-D10226E3750B}.Debug|x86.Build.0 = Debug|Any CPU - {C726DD78-2D56-48D3-928A-D10226E3750B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C726DD78-2D56-48D3-928A-D10226E3750B}.Release|Any CPU.Build.0 = Release|Any CPU - {C726DD78-2D56-48D3-928A-D10226E3750B}.Release|x64.ActiveCfg = Release|Any CPU - {C726DD78-2D56-48D3-928A-D10226E3750B}.Release|x64.Build.0 = Release|Any CPU - {C726DD78-2D56-48D3-928A-D10226E3750B}.Release|x86.ActiveCfg = Release|Any CPU - {C726DD78-2D56-48D3-928A-D10226E3750B}.Release|x86.Build.0 = Release|Any CPU - {9760D744-D1BF-40E3-BD6F-7F639BFB9188}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9760D744-D1BF-40E3-BD6F-7F639BFB9188}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9760D744-D1BF-40E3-BD6F-7F639BFB9188}.Debug|x64.ActiveCfg = Debug|Any CPU - {9760D744-D1BF-40E3-BD6F-7F639BFB9188}.Debug|x64.Build.0 = Debug|Any CPU - {9760D744-D1BF-40E3-BD6F-7F639BFB9188}.Debug|x86.ActiveCfg = Debug|Any CPU - {9760D744-D1BF-40E3-BD6F-7F639BFB9188}.Debug|x86.Build.0 = Debug|Any CPU - {9760D744-D1BF-40E3-BD6F-7F639BFB9188}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9760D744-D1BF-40E3-BD6F-7F639BFB9188}.Release|Any CPU.Build.0 = Release|Any CPU - {9760D744-D1BF-40E3-BD6F-7F639BFB9188}.Release|x64.ActiveCfg = Release|Any CPU - {9760D744-D1BF-40E3-BD6F-7F639BFB9188}.Release|x64.Build.0 = Release|Any CPU - {9760D744-D1BF-40E3-BD6F-7F639BFB9188}.Release|x86.ActiveCfg = Release|Any CPU - {9760D744-D1BF-40E3-BD6F-7F639BFB9188}.Release|x86.Build.0 = Release|Any CPU - {9639E4FD-0438-4901-B57F-EFF773B19D5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9639E4FD-0438-4901-B57F-EFF773B19D5A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9639E4FD-0438-4901-B57F-EFF773B19D5A}.Debug|x64.ActiveCfg = Debug|Any CPU - {9639E4FD-0438-4901-B57F-EFF773B19D5A}.Debug|x64.Build.0 = Debug|Any CPU - {9639E4FD-0438-4901-B57F-EFF773B19D5A}.Debug|x86.ActiveCfg = Debug|Any CPU - {9639E4FD-0438-4901-B57F-EFF773B19D5A}.Debug|x86.Build.0 = Debug|Any CPU - {9639E4FD-0438-4901-B57F-EFF773B19D5A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9639E4FD-0438-4901-B57F-EFF773B19D5A}.Release|Any CPU.Build.0 = Release|Any CPU - {9639E4FD-0438-4901-B57F-EFF773B19D5A}.Release|x64.ActiveCfg = Release|Any CPU - {9639E4FD-0438-4901-B57F-EFF773B19D5A}.Release|x64.Build.0 = Release|Any CPU - {9639E4FD-0438-4901-B57F-EFF773B19D5A}.Release|x86.ActiveCfg = Release|Any CPU - {9639E4FD-0438-4901-B57F-EFF773B19D5A}.Release|x86.Build.0 = Release|Any CPU - {E4BE54BF-F4D7-495F-9278-07E5A8C79935}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E4BE54BF-F4D7-495F-9278-07E5A8C79935}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E4BE54BF-F4D7-495F-9278-07E5A8C79935}.Debug|x64.ActiveCfg = Debug|Any CPU - {E4BE54BF-F4D7-495F-9278-07E5A8C79935}.Debug|x64.Build.0 = Debug|Any CPU - {E4BE54BF-F4D7-495F-9278-07E5A8C79935}.Debug|x86.ActiveCfg = Debug|Any CPU - {E4BE54BF-F4D7-495F-9278-07E5A8C79935}.Debug|x86.Build.0 = Debug|Any CPU - {E4BE54BF-F4D7-495F-9278-07E5A8C79935}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E4BE54BF-F4D7-495F-9278-07E5A8C79935}.Release|Any CPU.Build.0 = Release|Any CPU - {E4BE54BF-F4D7-495F-9278-07E5A8C79935}.Release|x64.ActiveCfg = Release|Any CPU - {E4BE54BF-F4D7-495F-9278-07E5A8C79935}.Release|x64.Build.0 = Release|Any CPU - {E4BE54BF-F4D7-495F-9278-07E5A8C79935}.Release|x86.ActiveCfg = Release|Any CPU - {E4BE54BF-F4D7-495F-9278-07E5A8C79935}.Release|x86.Build.0 = Release|Any CPU - {9DC17081-21D8-4123-8650-D97C2153DB8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9DC17081-21D8-4123-8650-D97C2153DB8C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9DC17081-21D8-4123-8650-D97C2153DB8C}.Debug|x64.ActiveCfg = Debug|Any CPU - {9DC17081-21D8-4123-8650-D97C2153DB8C}.Debug|x64.Build.0 = Debug|Any CPU - {9DC17081-21D8-4123-8650-D97C2153DB8C}.Debug|x86.ActiveCfg = Debug|Any CPU - {9DC17081-21D8-4123-8650-D97C2153DB8C}.Debug|x86.Build.0 = Debug|Any CPU - {9DC17081-21D8-4123-8650-D97C2153DB8C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9DC17081-21D8-4123-8650-D97C2153DB8C}.Release|Any CPU.Build.0 = Release|Any CPU - {9DC17081-21D8-4123-8650-D97C2153DB8C}.Release|x64.ActiveCfg = Release|Any CPU - {9DC17081-21D8-4123-8650-D97C2153DB8C}.Release|x64.Build.0 = Release|Any CPU - {9DC17081-21D8-4123-8650-D97C2153DB8C}.Release|x86.ActiveCfg = Release|Any CPU - {9DC17081-21D8-4123-8650-D97C2153DB8C}.Release|x86.Build.0 = Release|Any CPU - {FACB3EF2-F078-479A-A91C-719894CB66BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FACB3EF2-F078-479A-A91C-719894CB66BF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FACB3EF2-F078-479A-A91C-719894CB66BF}.Debug|x64.ActiveCfg = Debug|Any CPU - {FACB3EF2-F078-479A-A91C-719894CB66BF}.Debug|x64.Build.0 = Debug|Any CPU - {FACB3EF2-F078-479A-A91C-719894CB66BF}.Debug|x86.ActiveCfg = Debug|Any CPU - {FACB3EF2-F078-479A-A91C-719894CB66BF}.Debug|x86.Build.0 = Debug|Any CPU - {FACB3EF2-F078-479A-A91C-719894CB66BF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FACB3EF2-F078-479A-A91C-719894CB66BF}.Release|Any CPU.Build.0 = Release|Any CPU - {FACB3EF2-F078-479A-A91C-719894CB66BF}.Release|x64.ActiveCfg = Release|Any CPU - {FACB3EF2-F078-479A-A91C-719894CB66BF}.Release|x64.Build.0 = Release|Any CPU - {FACB3EF2-F078-479A-A91C-719894CB66BF}.Release|x86.ActiveCfg = Release|Any CPU - {FACB3EF2-F078-479A-A91C-719894CB66BF}.Release|x86.Build.0 = Release|Any CPU - {9D82AC2B-0075-4161-AE0E-4A6629C9FF2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9D82AC2B-0075-4161-AE0E-4A6629C9FF2A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9D82AC2B-0075-4161-AE0E-4A6629C9FF2A}.Debug|x64.ActiveCfg = Debug|Any CPU - {9D82AC2B-0075-4161-AE0E-4A6629C9FF2A}.Debug|x64.Build.0 = Debug|Any CPU - {9D82AC2B-0075-4161-AE0E-4A6629C9FF2A}.Debug|x86.ActiveCfg = Debug|Any CPU - {9D82AC2B-0075-4161-AE0E-4A6629C9FF2A}.Debug|x86.Build.0 = Debug|Any CPU - {9D82AC2B-0075-4161-AE0E-4A6629C9FF2A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9D82AC2B-0075-4161-AE0E-4A6629C9FF2A}.Release|Any CPU.Build.0 = Release|Any CPU - {9D82AC2B-0075-4161-AE0E-4A6629C9FF2A}.Release|x64.ActiveCfg = Release|Any CPU - {9D82AC2B-0075-4161-AE0E-4A6629C9FF2A}.Release|x64.Build.0 = Release|Any CPU - {9D82AC2B-0075-4161-AE0E-4A6629C9FF2A}.Release|x86.ActiveCfg = Release|Any CPU - {9D82AC2B-0075-4161-AE0E-4A6629C9FF2A}.Release|x86.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {A5906FBA-D73A-4A09-8539-CB10D7B586AE} = {8CCC98B3-1776-49FF-96D6-947A9E5DFB0A} - {D8055631-E6BB-4CD2-8162-F674D6D30E76} = {A5906FBA-D73A-4A09-8539-CB10D7B586AE} - {119AD438-878B-4383-BC9F-779F1605E711} = {A5906FBA-D73A-4A09-8539-CB10D7B586AE} - {4012C753-68DE-4737-936F-F5DBC485C51B} = {A5906FBA-D73A-4A09-8539-CB10D7B586AE} - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {F77A454C-CC17-4AD6-823A-64E1A94FDA0A} - EndGlobalSection -EndGlobal diff --git a/CloudEvents.slnx b/CloudEvents.slnx new file mode 100644 index 0000000..8201d7c --- /dev/null +++ b/CloudEvents.slnx @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Directory.Packages.props b/Directory.Packages.props index 89ed2d5..9f07ca8 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,9 +5,9 @@ - + - + @@ -17,8 +17,8 @@ - - - + + + diff --git a/global.json b/global.json index b61e1fb..3b37ca0 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.400", + "version": "10.0.102", "allowPrerelease": false, "rollForward": "latestMinor" } diff --git a/samples/CloudNative.CloudEvents.AspNetCoreSample/CloudEventBinding.cs b/samples/CloudNative.CloudEvents.AspNetCoreSample/CloudEventBinding.cs new file mode 100644 index 0000000..09e1192 --- /dev/null +++ b/samples/CloudNative.CloudEvents.AspNetCoreSample/CloudEventBinding.cs @@ -0,0 +1,52 @@ +using CloudNative.CloudEvents.AspNetCore; +using CloudNative.CloudEvents.Core; +using CloudNative.CloudEvents.SystemTextJson; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http.HttpResults; +using Microsoft.Extensions.DependencyInjection; +using System.Reflection; +using System.Threading.Tasks; + +namespace CloudNative.CloudEvents.AspNetCoreSample.Bindings; + +public class CloudEventBinding : IBindableFromHttpContext +{ + public CloudEvent Value { get; init; } + + public ProblemHttpResult Error { get; init; } + + public static async ValueTask BindAsync(HttpContext context, ParameterInfo parameter) + { + Validation.CheckNotNull(context, nameof(context)); + Validation.CheckNotNull(parameter, nameof(parameter)); + + var request = context.Request; + + // Even though we're not allowing non-JSON content in this binding, + // types such as "text/xml" could still be parsed with the current JsonEventFormatter, + // but it's just not making it strongly typed, or anything structured (XmlNode). + // Depending on your use-case, it may or may not be desirable to allow that. + if (request.ContentLength != 0 && !request.HasJsonContentType()) + { + return new CloudEventBinding + { + Error = TypedResults.Problem( + statusCode: StatusCodes.Status415UnsupportedMediaType, + title: "Unsupported media type", + detail: "Request content type is not JSON and not fully supported in this binding. " + + "Please note: the CloudEvents specification does allow for any data content, " + + "as long as it adheres to the provided datacontenttype." + ) + }; + } + + var formatter = context.RequestServices.GetRequiredService(); + + var cloudEvent = await request.ToCloudEventAsync(formatter); + + return new CloudEventBinding + { + Value = cloudEvent + }; + } +} \ No newline at end of file diff --git a/samples/CloudNative.CloudEvents.AspNetCoreSample/CloudEventJsonInputFormatter.cs b/samples/CloudNative.CloudEvents.AspNetCoreSample/CloudEventJsonInputFormatter.cs deleted file mode 100644 index 83cf74a..0000000 --- a/samples/CloudNative.CloudEvents.AspNetCoreSample/CloudEventJsonInputFormatter.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Cloud Native Foundation. -// Licensed under the Apache 2.0 license. -// See LICENSE file in the project root for full license information. - -using CloudNative.CloudEvents.AspNetCore; -using CloudNative.CloudEvents.Core; -using Microsoft.AspNetCore.Mvc.Formatters; -using Microsoft.Net.Http.Headers; -using System; -using System.Text; -using System.Threading.Tasks; - -namespace CloudNative.CloudEvents.AspNetCoreSample -{ - // FIXME: This doesn't get called for binary CloudEvents without content, or with a different data content type. - // FIXME: This shouldn't really be tied to JSON. We need to work out how we actually want this to be used. - // See - - /// - /// A that parses HTTP requests into CloudEvents. - /// - public class CloudEventJsonInputFormatter : TextInputFormatter - { - private readonly CloudEventFormatter _formatter; - - /// - /// Constructs a new instance that uses the given formatter for deserialization. - /// - /// - public CloudEventJsonInputFormatter(CloudEventFormatter formatter) - { - _formatter = Validation.CheckNotNull(formatter, nameof(formatter)); - SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse("application/json")); - SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse("application/cloudevents+json")); - - SupportedEncodings.Add(Encoding.UTF8); - SupportedEncodings.Add(Encoding.Unicode); - } - - /// - public override async Task ReadRequestBodyAsync(InputFormatterContext context, Encoding encoding) - { - Validation.CheckNotNull(context, nameof(context)); - Validation.CheckNotNull(encoding, nameof(encoding)); - - var request = context.HttpContext.Request; - - try - { - var cloudEvent = await request.ToCloudEventAsync(_formatter); - return await InputFormatterResult.SuccessAsync(cloudEvent); - } - catch (Exception) - { - return await InputFormatterResult.FailureAsync(); - } - } - - /// - protected override bool CanReadType(Type type) - => type == typeof(CloudEvent) && base.CanReadType(type); - } -} diff --git a/samples/CloudNative.CloudEvents.AspNetCoreSample/CloudEventOperations.cs b/samples/CloudNative.CloudEvents.AspNetCoreSample/CloudEventOperations.cs new file mode 100644 index 0000000..d22bddd --- /dev/null +++ b/samples/CloudNative.CloudEvents.AspNetCoreSample/CloudEventOperations.cs @@ -0,0 +1,65 @@ +// Copyright (c) Cloud Native Foundation. +// Licensed under the Apache 2.0 license. +// See LICENSE file in the project root for full license information. + +using CloudNative.CloudEvents.AspNetCore; +using CloudNative.CloudEvents.AspNetCoreSample.Bindings; +using CloudNative.CloudEvents.SystemTextJson; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http.HttpResults; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace CloudNative.CloudEvents.AspNetCoreSample.Operations +{ + public class CloudEventOperations + { + public static async Task>> ReceiveCloudEvent(CloudEventBinding cloudEventBinding) + { + if (cloudEventBinding.Error is not null) + { + return cloudEventBinding.Error; + } + + var cloudEvent = cloudEventBinding.Value; + + var cloudEventAttributes = new Dictionary(); + foreach (var (attribute, attributeValue) in cloudEvent.GetPopulatedAttributes()) + { + cloudEventAttributes[attribute.Name] = attribute.Format(attributeValue); + } + + return TypedResults.Json(new + { + note = "wow, such event, much disassembling, very skill", + cloudEvent.SpecVersion.VersionId, + cloudEventAttributes, + cloudEvent.Data + }); + } + + /// + /// Generates a CloudEvent. + /// + public static async Task GenerateCloudEvent(HttpResponse response, JsonEventFormatter formatter, ContentMode contentMode = ContentMode.Structured) + { + var evt = new CloudEvent + { + Type = "CloudNative.CloudEvents.AspNetCoreSample", + Source = new Uri("https://github.com/cloudevents/sdk-csharp"), + Time = DateTimeOffset.Now, + DataContentType = "application/json", + Id = Guid.NewGuid().ToString(), + Data = new + { + Language = "C#", + EnvironmentVersion = Environment.Version.ToString() + } + }; + + response.StatusCode = StatusCodes.Status200OK; + await evt.CopyToHttpResponseAsync(response, contentMode, formatter); + } + } +} diff --git a/samples/CloudNative.CloudEvents.AspNetCoreSample/CloudNative.CloudEvents.AspNetCoreSample.csproj b/samples/CloudNative.CloudEvents.AspNetCoreSample/CloudNative.CloudEvents.AspNetCoreSample.csproj index 1bc3472..abc0198 100644 --- a/samples/CloudNative.CloudEvents.AspNetCoreSample/CloudNative.CloudEvents.AspNetCoreSample.csproj +++ b/samples/CloudNative.CloudEvents.AspNetCoreSample/CloudNative.CloudEvents.AspNetCoreSample.csproj @@ -1,13 +1,13 @@ - net6.0 + net10.0 - + diff --git a/samples/CloudNative.CloudEvents.AspNetCoreSample/CloudNative.CloudEvents.AspNetCoreSample.http b/samples/CloudNative.CloudEvents.AspNetCoreSample/CloudNative.CloudEvents.AspNetCoreSample.http index 9eec593..f59e307 100644 --- a/samples/CloudNative.CloudEvents.AspNetCoreSample/CloudNative.CloudEvents.AspNetCoreSample.http +++ b/samples/CloudNative.CloudEvents.AspNetCoreSample/CloudNative.CloudEvents.AspNetCoreSample.http @@ -1,16 +1,56 @@ @HostAddress = https://localhost:5001 +### Send via Structured mode + +POST {{HostAddress}}/api/events/receive +Content-Type: application/cloudevents+json; charset=utf-8 + +{ + "specversion": "1.0", + "type": "com.example.myevent", + "source": "urn:example-com:mysource:abc", + "id": "{{$guid}}", + "data": { + "message": "Hello world!" + } +} + +### Send via Binary mode + POST {{HostAddress}}/api/events/receive Content-Type: application/json CE-SpecVersion: 1.0 CE-Type: "com.example.myevent" CE-Source: "urn:example-com:mysource:abc" -CE-Id: "c457b7c5-c038-4be9-98b9-938cb64a4fbf" +CE-Id: "{{$guid}}" { "message": "Hello world!" } -### +### Send content-less via Binary mode + +POST {{HostAddress}}/api/events/receive +CE-SpecVersion: 1.0 +CE-Type: "com.example.myevent" +CE-Source: "urn:example-com:mysource:abc" +CE-Id: "{{$guid}}" + +### Send unsupported media type (XML) via Binary mode + +POST {{HostAddress}}/api/events/receive +Content-Type: text/xml +CE-SpecVersion: 1.0 +CE-Type: "com.example.myevent" +CE-Source: "urn:example-com:mysource:abc" +CE-Id: "{{$guid}}" + +Hello world! + +### Generate via Structured mode GET {{HostAddress}}/api/events/generate + +### Generate via Binary mode + +GET {{HostAddress}}/api/events/generate?contentMode=Binary diff --git a/samples/CloudNative.CloudEvents.AspNetCoreSample/Controllers/CloudEventController.cs b/samples/CloudNative.CloudEvents.AspNetCoreSample/Controllers/CloudEventController.cs deleted file mode 100644 index b2ed371..0000000 --- a/samples/CloudNative.CloudEvents.AspNetCoreSample/Controllers/CloudEventController.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Cloud Native Foundation. -// Licensed under the Apache 2.0 license. -// See LICENSE file in the project root for full license information. - -using CloudNative.CloudEvents.NewtonsoftJson; -using Microsoft.AspNetCore.Mvc; -using Newtonsoft.Json.Linq; -using System; -using System.Collections.Generic; -using System.Text; - -namespace CloudNative.CloudEvents.AspNetCoreSample.Controllers -{ - [Route("api/events")] - [ApiController] - public class CloudEventController : ControllerBase - { - private static readonly CloudEventFormatter formatter = new JsonEventFormatter(); - - [HttpPost("receive")] - public ActionResult> ReceiveCloudEvent([FromBody] CloudEvent cloudEvent) - { - var attributeMap = new JObject(); - foreach (var (attribute, value) in cloudEvent.GetPopulatedAttributes()) - { - attributeMap[attribute.Name] = attribute.Format(value); - } - return Ok($"Received event with ID {cloudEvent.Id}, attributes: {attributeMap}"); - } - - /// - /// Generates a CloudEvent in "structured mode", where all CloudEvent information is - /// included within the body of the response. - /// - [HttpGet("generate")] - public ActionResult GenerateCloudEvent() - { - var evt = new CloudEvent - { - Type = "CloudNative.CloudEvents.AspNetCoreSample", - Source = new Uri("https://github.com/cloudevents/sdk-csharp"), - Time = DateTimeOffset.Now, - DataContentType = "application/json", - Id = Guid.NewGuid().ToString(), - Data = new - { - Language = "C#", - EnvironmentVersion = Environment.Version.ToString() - } - }; - // Format the event as the body of the response. This is UTF-8 JSON because of - // the CloudEventFormatter we're using, but EncodeStructuredModeMessage always - // returns binary data. We could return the data directly, but for debugging - // purposes it's useful to have the JSON string. - var bytes = formatter.EncodeStructuredModeMessage(evt, out var contentType); - string json = Encoding.UTF8.GetString(bytes.Span); - var result = Ok(json); - - // Specify the content type of the response: this is what makes it a CloudEvent. - // (In "binary mode", the content type is the content type of the data, and headers - // indicate that it's a CloudEvent.) - result.ContentTypes.Add(contentType.MediaType); - return result; - } - } -} diff --git a/samples/CloudNative.CloudEvents.AspNetCoreSample/Program.cs b/samples/CloudNative.CloudEvents.AspNetCoreSample/Program.cs index c75e741..3a8013d 100644 --- a/samples/CloudNative.CloudEvents.AspNetCoreSample/Program.cs +++ b/samples/CloudNative.CloudEvents.AspNetCoreSample/Program.cs @@ -2,19 +2,25 @@ // Licensed under the Apache 2.0 license. // See LICENSE file in the project root for full license information. -using CloudNative.CloudEvents.AspNetCoreSample; +using CloudNative.CloudEvents.AspNetCoreSample.Operations; +using CloudNative.CloudEvents.SystemTextJson; using Microsoft.AspNetCore.Builder; -using CloudNative.CloudEvents.NewtonsoftJson; using Microsoft.Extensions.DependencyInjection; +using System.Text.Json; var builder = WebApplication.CreateBuilder(args); -builder.Services.AddControllers(opts => - opts.InputFormatters.Insert(0, new CloudEventJsonInputFormatter(new JsonEventFormatter()))); +JsonSerializerOptions jsonOptions = new() +{ + PropertyNamingPolicy = JsonNamingPolicy.CamelCase, +}; +builder.Services.AddSingleton(new JsonEventFormatter(jsonOptions, new JsonDocumentOptions())); var app = builder.Build(); -app.MapControllers(); +var apiEvents = app.MapGroup("/api/events"); +apiEvents.MapPost("/receive", CloudEventOperations.ReceiveCloudEvent); +apiEvents.MapGet("/generate", CloudEventOperations.GenerateCloudEvent); app.Run(); diff --git a/samples/HttpSend/HttpSend.csproj b/samples/HttpSend/HttpSend.csproj index ccb54bd..31777ae 100644 --- a/samples/HttpSend/HttpSend.csproj +++ b/samples/HttpSend/HttpSend.csproj @@ -2,13 +2,13 @@ Exe - net6.0 + net10.0 - + diff --git a/samples/HttpSend/Program.cs b/samples/HttpSend/Program.cs index 7532aac..bab5d9a 100644 --- a/samples/HttpSend/Program.cs +++ b/samples/HttpSend/Program.cs @@ -4,9 +4,8 @@ using CloudNative.CloudEvents; using CloudNative.CloudEvents.Http; -using CloudNative.CloudEvents.NewtonsoftJson; +using CloudNative.CloudEvents.SystemTextJson; using McMaster.Extensions.CommandLineUtils; -using Newtonsoft.Json; using System; using System.ComponentModel.DataAnnotations; using System.Net.Http; @@ -38,7 +37,10 @@ private async Task OnExecuteAsync() Type = Type, Source = new Uri(Source), DataContentType = MediaTypeNames.Application.Json, - Data = JsonConvert.SerializeObject("hey there!") + Data = new + { + hey = "There" + } }; var content = cloudEvent.ToHttpContent(ContentMode.Structured, new JsonEventFormatter()); diff --git a/samples/README.md b/samples/README.md index cf73e16..6d24970 100644 --- a/samples/README.md +++ b/samples/README.md @@ -10,7 +10,7 @@ This directory contains a sample ASP.NET Core application that exposes two endpo To run the sample, execute the `dotnet run` command in the `CloudNative.CloudEvents.AspNetCoreSample` directory. ```shell -dotnet run --framework net6.0 +dotnet run --framework net10.0 ``` After running the web service using the command above, there are three strategies for sending requests to the web service. @@ -20,7 +20,7 @@ After running the web service using the command above, there are three strategie The `HttpSend` project provides a CLI tool for sending requests to the `/api/events/receive` endpoint exposed by the service. To use the tool, navigate to the `HttpSend` directory and execute the following command: ```shell -dotnet run --framework net6.0 --url https://localhost:5001/api/events/receive +dotnet run --framework net10.0 --url https://localhost:5001/api/events/receive ``` ### Using the `.http` file diff --git a/test/CloudNative.CloudEvents.IntegrationTests/AspNetCore/CloudEventControllerTests.cs b/test/CloudNative.CloudEvents.IntegrationTests/AspNetCore/CloudEventBindingTests.cs similarity index 77% rename from test/CloudNative.CloudEvents.IntegrationTests/AspNetCore/CloudEventControllerTests.cs rename to test/CloudNative.CloudEvents.IntegrationTests/AspNetCore/CloudEventBindingTests.cs index b59ecf2..d1132aa 100644 --- a/test/CloudNative.CloudEvents.IntegrationTests/AspNetCore/CloudEventControllerTests.cs +++ b/test/CloudNative.CloudEvents.IntegrationTests/AspNetCore/CloudEventBindingTests.cs @@ -2,9 +2,8 @@ // Licensed under the Apache 2.0 license. // See LICENSE file in the project root for full license information. -using CloudNative.CloudEvents.AspNetCoreSample; using CloudNative.CloudEvents.Http; -using CloudNative.CloudEvents.NewtonsoftJson; +using CloudNative.CloudEvents.SystemTextJson; using Microsoft.AspNetCore.Mvc.Testing; using System; using System.Net; @@ -13,11 +12,11 @@ namespace CloudNative.CloudEvents.IntegrationTests.AspNetCore { - public class CloudEventControllerTests : IClassFixture> + public class CloudEventBindingTests : IClassFixture> { private readonly WebApplicationFactory _factory; - public CloudEventControllerTests(WebApplicationFactory factory) + public CloudEventBindingTests(WebApplicationFactory factory) { _factory = factory; } @@ -25,7 +24,7 @@ public CloudEventControllerTests(WebApplicationFactory factory) [Theory] [InlineData(ContentMode.Structured)] [InlineData(ContentMode.Binary)] - public async Task Controller_WithValidCloudEvent_NoContent_DeserializesUsingPipeline(ContentMode contentMode) + public async Task Binding_WithValidCloudEvent_NoContent_DeserializesUsingPipeline(ContentMode contentMode) { // Arrange var expectedExtensionKey = "comexampleextension1"; @@ -50,7 +49,7 @@ public async Task Controller_WithValidCloudEvent_NoContent_DeserializesUsingPipe Assert.Equal(HttpStatusCode.OK, result.StatusCode); Assert.Contains(cloudEvent.Id, resultContent); Assert.Contains(cloudEvent.Type, resultContent); - Assert.Contains($"\"{expectedExtensionKey}\": \"{expectedExtensionValue}\"", resultContent); + Assert.Contains($"\"{expectedExtensionKey}\":\"{expectedExtensionValue}\"", resultContent); } } } diff --git a/test/CloudNative.CloudEvents.IntegrationTests/CloudNative.CloudEvents.IntegrationTests.csproj b/test/CloudNative.CloudEvents.IntegrationTests/CloudNative.CloudEvents.IntegrationTests.csproj index 3dc846d..3c4d862 100644 --- a/test/CloudNative.CloudEvents.IntegrationTests/CloudNative.CloudEvents.IntegrationTests.csproj +++ b/test/CloudNative.CloudEvents.IntegrationTests/CloudNative.CloudEvents.IntegrationTests.csproj @@ -1,11 +1,11 @@ - net6.0;net8.0 + net10.0 - + diff --git a/test/CloudNative.CloudEvents.UnitTests/ConformanceTestData/TestDataProvider.cs b/test/CloudNative.CloudEvents.UnitTests/ConformanceTestData/TestDataProvider.cs index ff6e8ea..be5f54c 100644 --- a/test/CloudNative.CloudEvents.UnitTests/ConformanceTestData/TestDataProvider.cs +++ b/test/CloudNative.CloudEvents.UnitTests/ConformanceTestData/TestDataProvider.cs @@ -49,7 +49,7 @@ private static string FindRepoRoot() var directory = new DirectoryInfo(currentDirectory); while (directory != null && (!File.Exists(Path.Combine(directory.FullName, "LICENSE")) - || !File.Exists(Path.Combine(directory.FullName, "CloudEvents.sln")))) + || !File.Exists(Path.Combine(directory.FullName, "CloudEvents.slnx")))) { directory = directory.Parent; }