-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0233e3e
commit 28e3a0e
Showing
10 changed files
with
115 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using Microsoft.AspNetCore.Http; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.Azure.WebJobs; | ||
using Microsoft.Azure.WebJobs.Host; | ||
using Microsoft.Extensions.Logging; | ||
|
||
namespace Rocket.Surgery.Functions | ||
{ | ||
public class Function | ||
{ | ||
private readonly ILogger _logger; | ||
|
||
public Function(ILogger<Function> logger) => _logger = logger; | ||
|
||
[FunctionName("Function")] | ||
public ActionResult<int> Run([HttpTrigger("get")]HttpRequest context, ILogger logger) | ||
{ | ||
logger.LogInformation($"C# Timer trigger function executed at: {DateTime.Now}"); | ||
_logger.LogInformation($"C# Timer trigger function executed at: {DateTime.Now}"); | ||
|
||
return 1; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>netcoreapp2.1</TargetFramework> | ||
<AzureFunctionsVersion>v2</AzureFunctionsVersion> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<!--#if (no-version) | ||
<PackageReference Include="Newtonsoft.Json" /> | ||
<PackageReference Include="Microsoft.NET.Sdk.Functions" /> | ||
<PackageReference Include="Rocket.Surgery.Hosting.Functions" /> | ||
<PackageReference Include="Rocket.Surgery.Conventions" /> | ||
<PackageReference Include="Rocket.Surgery.Extensions.Configuration" /> | ||
<PackageReference Include="Rocket.Surgery.Extensions.DependencyInjection" /> | ||
<PackageReference Include="Rocket.Surgery.Extensions.Logging" /> | ||
#endif --> | ||
<!--#if (!no-version) --> | ||
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" /> | ||
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.29" /> | ||
<PackageReference Include="Rocket.Surgery.Hosting.Functions" Version="4.0.0" /> | ||
<PackageReference Include="Rocket.Surgery.Conventions" Version="6.2.2" /> | ||
<PackageReference Include="Rocket.Surgery.Extensions.Configuration" Version="6.0.3" /> | ||
<PackageReference Include="Rocket.Surgery.Extensions.DependencyInjection" Version="6.0.3" /> | ||
<PackageReference Include="Rocket.Surgery.Extensions.Logging" Version="6.0.3" /> | ||
<!--#endif --> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Update="host.json"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
</None> | ||
<None Update="local.settings.json"> | ||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
<CopyToPublishDirectory>Never</CopyToPublishDirectory> | ||
</None> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System; | ||
using Microsoft.Azure.WebJobs; | ||
using Microsoft.Azure.WebJobs.Host; | ||
using Microsoft.Azure.WebJobs.Hosting; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using Microsoft.Extensions.Logging; | ||
using Rocket.Surgery.Extensions.DependencyInjection; | ||
using Rocket.Surgery.Hosting.Functions; | ||
|
||
[assembly: WebJobsStartup(typeof(Rocket.Surgery.Functions.Startup))] | ||
|
||
namespace Rocket.Surgery.Functions | ||
{ | ||
public class Startup : IWebJobsStartup, IServiceConvention | ||
{ | ||
public void Register(IServiceConventionContext context) | ||
{ | ||
} | ||
|
||
public void Configure(IWebJobsBuilder builder) | ||
{ | ||
builder.UseRocketSurgery( | ||
this, | ||
hostBuilder => | ||
{ | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"version": "2.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"IsEncrypted": false, | ||
"Values": { | ||
"AzureWebJobsStorage": "", | ||
"FUNCTIONS_WORKER_RUNTIME": "dotnet" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters