diff --git a/Func/Func.csproj b/Func/Func.csproj index 313095e2..2b30812f 100644 --- a/Func/Func.csproj +++ b/Func/Func.csproj @@ -1,6 +1,6 @@  - net8.0 + net10.0 v4 Exe enable @@ -9,15 +9,21 @@ ICSharpCode.CodeConverter.Func <_FunctionsSkipCleanOutput>true - + + + + + + + - + - - + + @@ -27,7 +33,7 @@ - + diff --git a/Func/Program.cs b/Func/Program.cs index ce03e736..6407641a 100644 --- a/Func/Program.cs +++ b/Func/Program.cs @@ -4,15 +4,12 @@ var host = new HostBuilder() .ConfigureFunctionsWebApplication() - .ConfigureServices(services => - { - services.AddApplicationInsightsTelemetryWorkerService(); - services.ConfigureFunctionsApplicationInsights(); - - services.AddCors(options => - { - options.AddPolicy("AllowWeb", builder => - { + .ConfigureServices(services => { + services.AddApplicationInsightsTelemetryWorkerService() + .ConfigureFunctionsApplicationInsights(); + + services.AddCors(options => { + options.AddPolicy("AllowWeb", builder => { builder.WithOrigins("http://localhost:5173") .AllowAnyMethod() .AllowAnyHeader(); diff --git a/Func/TestingWithBruno/bruno.json b/Func/TestingWithBruno/bruno.json new file mode 100644 index 00000000..7a20280a --- /dev/null +++ b/Func/TestingWithBruno/bruno.json @@ -0,0 +1,9 @@ +{ + "version": "1", + "name": "CodeConverter", + "type": "collection", + "ignore": [ + "node_modules", + ".git" + ] +} \ No newline at end of file diff --git a/Func/TestingWithBruno/getVersion.bru b/Func/TestingWithBruno/getVersion.bru new file mode 100644 index 00000000..a0364185 --- /dev/null +++ b/Func/TestingWithBruno/getVersion.bru @@ -0,0 +1,15 @@ +meta { + name: getVersion + type: http + seq: 1 +} + +get { + url: http://localhost:7144/api/Version + body: none + auth: inherit +} + +settings { + encodeUrl: true +} diff --git a/Func/TestingWithBruno/postConversion.bru b/Func/TestingWithBruno/postConversion.bru new file mode 100644 index 00000000..d79b2d67 --- /dev/null +++ b/Func/TestingWithBruno/postConversion.bru @@ -0,0 +1,20 @@ +meta { + name: postConversion + type: http + seq: 2 +} + +post { + url: http://localhost:7144/api/Convert + body: json + auth: inherit +} + +body:json { + {"code": "usingSystem;usingSystem.Collections.Generic;usingSystem.Collections.Immutable;usingSystem.Diagnostics;usingSystem.Diagnostics.CodeAnalysis;usingSystem.Linq;usingSystem.Threading;usingSystem.Threading.Tasks;classProgram{staticvoidMain(){Console.WriteLine(\"Hello.\");}}","requestedConversion":"cs2vbnet"} +} + +settings { + encodeUrl: true + timeout: 0 +}