-
Notifications
You must be signed in to change notification settings - Fork 43
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
Showing
13 changed files
with
151 additions
and
54 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"azureFunctions.deploySubpath": "bin/Release/net8.0/publish", | ||
"azureFunctions.projectLanguage": "C#", | ||
"azureFunctions.projectRuntime": "~4", | ||
"debug.internalConsoleOptions": "neverOpen", | ||
"azureFunctions.preDeployTask": "publish (functions)" | ||
} |
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 |
---|---|---|
@@ -1,13 +1,69 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "func: host start", | ||
"type": "func", | ||
"command": "host start", | ||
"problemMatcher": "$func-watch", | ||
"isBackground": true, | ||
|
||
} | ||
{ | ||
"label": "clean (functions)", | ||
"command": "dotnet", | ||
"args": [ | ||
"clean", | ||
"/property:GenerateFullPaths=true", | ||
"/consoleloggerparameters:NoSummary" | ||
], | ||
"type": "process", | ||
"problemMatcher": "$msCompile" | ||
}, | ||
{ | ||
"label": "build (functions)", | ||
"command": "dotnet", | ||
"args": [ | ||
"build", | ||
"/property:GenerateFullPaths=true", | ||
"/consoleloggerparameters:NoSummary" | ||
], | ||
"type": "process", | ||
"dependsOn": "clean (functions)", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"problemMatcher": "$msCompile" | ||
}, | ||
{ | ||
"label": "clean release (functions)", | ||
"command": "dotnet", | ||
"args": [ | ||
"clean", | ||
"--configuration", | ||
"Release", | ||
"/property:GenerateFullPaths=true", | ||
"/consoleloggerparameters:NoSummary" | ||
], | ||
"type": "process", | ||
"problemMatcher": "$msCompile" | ||
}, | ||
{ | ||
"label": "publish (functions)", | ||
"command": "dotnet", | ||
"args": [ | ||
"publish", | ||
"--configuration", | ||
"Release", | ||
"/property:GenerateFullPaths=true", | ||
"/consoleloggerparameters:NoSummary" | ||
], | ||
"type": "process", | ||
"dependsOn": "clean release (functions)", | ||
"problemMatcher": "$msCompile" | ||
}, | ||
{ | ||
"type": "func", | ||
"dependsOn": "build (functions)", | ||
"options": { | ||
"cwd": "${workspaceFolder}/bin/Debug/net8.0" | ||
}, | ||
"command": "host start", | ||
"isBackground": true, | ||
"problemMatcher": "$func-dotnet-watch" | ||
} | ||
] | ||
} | ||
} |
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 |
---|---|---|
@@ -1,13 +1,17 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Api.Function; | ||
|
||
public class Counter | ||
namespace Api.Function | ||
{ | ||
|
||
[JsonPropertyName("id")] | ||
public string? Id {get; set;} | ||
|
||
[JsonPropertyName("count")] | ||
public int Count {get;set;} | ||
public class Counter | ||
{ | ||
[JsonPropertyName("id")] | ||
public string Id { get; set; } | ||
|
||
[JsonPropertyName("count")] | ||
public int Count { get; set; } | ||
public Counter(string id) | ||
{ | ||
Id = id ?? throw new ArgumentNullException(nameof(id)); | ||
} | ||
} | ||
} |
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
Binary file not shown.
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 |
---|---|---|
@@ -1,16 +1,12 @@ | ||
#!/bin/bash | ||
# set to 9 or 10 | ||
DEBIAN_VERSION=10 | ||
|
||
# Import the public repository GPG keys | ||
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg | ||
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg | ||
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/ | ||
wget -q https://packages.microsoft.com/config/debian/$DEBIAN_VERSION/prod.list | ||
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list | ||
sudo chown root:root /etc/apt/trusted.gpg.d/microsoft.asc.gpg | ||
sudo chown root:root /etc/apt/sources.list.d/microsoft-prod.list | ||
|
||
# Move the GPG key to the appropriate directory | ||
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg | ||
|
||
# Set up the stable repository | ||
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/debian/$(lsb_release -rs | cut -d'.' -f 1)/prod $(lsb_release -cs) main" > /etc/apt/sources.list.d/dotnetdev.list' | ||
|
||
# Update the package lists for upgrades and new packages | ||
sudo apt-get update | ||
|
||
# Install the Azure Functions Core Tools | ||
sudo apt-get install azure-functions-core-tools-4 |
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,31 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.5.002.0 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "api", "api\api.csproj", "{82F065D8-4DCE-4A40-ACE8-571D047EA2F1}" | ||
EndProject | ||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "tests", "tests\tests.csproj", "{21EEEFE3-450D-4898-AF27-992C80CE6FB2}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{82F065D8-4DCE-4A40-ACE8-571D047EA2F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{82F065D8-4DCE-4A40-ACE8-571D047EA2F1}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{82F065D8-4DCE-4A40-ACE8-571D047EA2F1}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{82F065D8-4DCE-4A40-ACE8-571D047EA2F1}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{21EEEFE3-450D-4898-AF27-992C80CE6FB2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{21EEEFE3-450D-4898-AF27-992C80CE6FB2}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{21EEEFE3-450D-4898-AF27-992C80CE6FB2}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{21EEEFE3-450D-4898-AF27-992C80CE6FB2}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {EBA57613-07C6-4C47-B1C9-BF0D1DC3CF41} | ||
EndGlobalSection | ||
EndGlobal |
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