Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions Func/Func.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
Expand All @@ -9,15 +9,21 @@
<AssemblyName>ICSharpCode.CodeConverter.Func</AssemblyName>
<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
</PropertyGroup>


<ItemGroup>
<Compile Remove="TestingWithBruno\**" />
<EmbeddedResource Remove="TestingWithBruno\**" />
<None Remove="TestingWithBruno\**" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\CodeConverter\Common\DefaultReferences.cs" Link="DefaultReferences.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\CodeConverter\CodeConverter.csproj" />
</ItemGroup>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.51.0" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.3.0" />
Expand All @@ -27,7 +33,7 @@
<PackageReference Include="Microsoft.Azure.Functions.Worker.ApplicationInsights" Version="1.4.0" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.1.4" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />

<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="10.0.2" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.14.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.14.0" />
Expand Down
15 changes: 6 additions & 9 deletions Func/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
9 changes: 9 additions & 0 deletions Func/TestingWithBruno/bruno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"version": "1",
"name": "CodeConverter",
"type": "collection",
"ignore": [
"node_modules",
".git"
]
}
15 changes: 15 additions & 0 deletions Func/TestingWithBruno/getVersion.bru
Original file line number Diff line number Diff line change
@@ -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
}
20 changes: 20 additions & 0 deletions Func/TestingWithBruno/postConversion.bru
Original file line number Diff line number Diff line change
@@ -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
}
Loading