Skip to content

Commit d877176

Browse files
committed
Update azure functions sample [skip ci]
1 parent c70b8e2 commit d877176

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

tests/MaxRev.Gdal.Core.Tests.AzureFunctions/ConfigureFunction.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
1-
using System.IO;
2-
using System.Threading.Tasks;
3-
using MaxRev.Gdal.Core;
41
using Microsoft.AspNetCore.Http;
52
using Microsoft.AspNetCore.Mvc;
63
using Microsoft.Azure.WebJobs;
74
using Microsoft.Azure.WebJobs.Extensions.Http;
85
using Microsoft.Extensions.Logging;
9-
using Newtonsoft.Json;
6+
using System.Threading.Tasks;
107

11-
namespace GdalCore_AzureFunctions
8+
namespace MaxRev.Gdal.Core.Tests.AzureFunctions
129
{
1310
public static class ConfigureFunction
1411
{
12+
static ConfigureFunction()
13+
{
14+
GdalBase.ConfigureAll();
15+
}
16+
1517
[FunctionName("ConfigureFunction")]
1618
public static Task<IActionResult> Run(
1719
[HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = null)] HttpRequest req,
1820
ILogger log)
1921
{
2022
log.LogInformation("C# HTTP trigger function processed a request.");
21-
23+
2224
var result = RunConfigureCore(req, log);
2325

2426
return Task.FromResult<IActionResult>(new OkObjectResult("Gdal configured: " + result));
@@ -28,9 +30,7 @@ public static Task<IActionResult> Run(
2830
public static bool RunConfigureCore(
2931
[HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = null)] HttpRequest req,
3032
ILogger log)
31-
{
32-
GdalBase.ConfigureAll();
33-
33+
{
3434
return GdalBase.IsConfigured;
3535
}
3636
}

tests/MaxRev.Gdal.Core.Tests.AzureFunctions/MaxRev.Gdal.Core.Tests.AzureFunctions.csproj

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net7.0</TargetFramework>
4-
<AzureFunctionsVersion>v3</AzureFunctionsVersion>
3+
<TargetFramework>net6.0</TargetFramework>
54
<RootNamespace>MaxRev.Gdal.Core.Tests.AzureFunctions</RootNamespace>
65
<Platform>x64</Platform>
6+
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
7+
<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
78
</PropertyGroup>
89
<ItemGroup>
10+
<PackageReference Include="MaxRev.Gdal.Core" Version="3.6.1.100" />
11+
<PackageReference Include="MaxRev.Gdal.LinuxRuntime.Minimal" Version="3.6.1.100" />
12+
<PackageReference Include="MaxRev.Gdal.WindowsRuntime.Minimal" Version="3.6.1.110" />
913
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="4.1.3" />
10-
<PackageReference Include="MaxRev.Gdal.Core" Version="3.3.3.110" />
11-
<PackageReference Include="MaxRev.Gdal.LinuxRuntime.Minimal" Version="3.3.3.120" />
12-
<PackageReference Include="MaxRev.Gdal.WindowsRuntime.Minimal" Version="3.3.3.110" />
1314
</ItemGroup>
1415
<ItemGroup>
1516
<None Update="host.json">

0 commit comments

Comments
 (0)