Skip to content

Commit b51f1ca

Browse files
authored
Merge pull request #1 from RomFAN/first_deploy
First deploy
2 parents 81cf62d + 8bce6dd commit b51f1ca

47 files changed

Lines changed: 1134 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AzureTest.csproj

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.11" />
11+
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
12+
</ItemGroup>
13+
14+
</Project>

AzureTest.http

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@AzureTest_HostAddress = http://localhost:5075
2+
3+
GET {{AzureTest_HostAddress}}/weatherforecast/
4+
Accept: application/json
5+
6+
###

AzureTest.sln

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Microsoft Visual Studio Solution File, Format Version 12.00
2+
# Visual Studio Version 17
3+
VisualStudioVersion = 17.5.2.0
4+
MinimumVisualStudioVersion = 10.0.40219.1
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AzureTest", "AzureTest.csproj", "{70F00CFD-4617-635A-5687-137450B3CD79}"
6+
EndProject
7+
Global
8+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
9+
Debug|Any CPU = Debug|Any CPU
10+
Release|Any CPU = Release|Any CPU
11+
EndGlobalSection
12+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
13+
{70F00CFD-4617-635A-5687-137450B3CD79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
14+
{70F00CFD-4617-635A-5687-137450B3CD79}.Debug|Any CPU.Build.0 = Debug|Any CPU
15+
{70F00CFD-4617-635A-5687-137450B3CD79}.Release|Any CPU.ActiveCfg = Release|Any CPU
16+
{70F00CFD-4617-635A-5687-137450B3CD79}.Release|Any CPU.Build.0 = Release|Any CPU
17+
EndGlobalSection
18+
GlobalSection(SolutionProperties) = preSolution
19+
HideSolutionNode = FALSE
20+
EndGlobalSection
21+
GlobalSection(ExtensibilityGlobals) = postSolution
22+
SolutionGuid = {E7E4024F-FA82-482D-8A11-FE207C1BE41F}
23+
EndGlobalSection
24+
EndGlobal

Program.cs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
var builder = WebApplication.CreateBuilder(args);
2+
3+
// Add services to the container.
4+
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
5+
builder.Services.AddEndpointsApiExplorer();
6+
builder.Services.AddSwaggerGen();
7+
8+
var app = builder.Build();
9+
10+
// Configure the HTTP request pipeline.
11+
if (app.Environment.IsDevelopment())
12+
{
13+
app.UseSwagger();
14+
app.UseSwaggerUI();
15+
}
16+
17+
app.UseHttpsRedirection();
18+
19+
var summaries = new[]
20+
{
21+
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
22+
};
23+
24+
app.MapGet("/weatherforecast", () =>
25+
{
26+
var forecast = Enumerable.Range(1, 5).Select(index =>
27+
new WeatherForecast
28+
(
29+
DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
30+
Random.Shared.Next(-20, 55),
31+
summaries[Random.Shared.Next(summaries.Length)]
32+
))
33+
.ToArray();
34+
return forecast;
35+
})
36+
.WithName("GetWeatherForecast")
37+
.WithOpenApi();
38+
39+
app.Run();
40+
41+
record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary)
42+
{
43+
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
44+
}

Properties/launchSettings.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"$schema": "http://json.schemastore.org/launchsettings.json",
3+
"iisSettings": {
4+
"windowsAuthentication": false,
5+
"anonymousAuthentication": true,
6+
"iisExpress": {
7+
"applicationUrl": "http://localhost:63470",
8+
"sslPort": 44382
9+
}
10+
},
11+
"profiles": {
12+
"http": {
13+
"commandName": "Project",
14+
"dotnetRunMessages": true,
15+
"launchBrowser": true,
16+
"launchUrl": "swagger",
17+
"applicationUrl": "http://localhost:5075",
18+
"environmentVariables": {
19+
"ASPNETCORE_ENVIRONMENT": "Development"
20+
}
21+
},
22+
"https": {
23+
"commandName": "Project",
24+
"dotnetRunMessages": true,
25+
"launchBrowser": true,
26+
"launchUrl": "swagger",
27+
"applicationUrl": "https://localhost:7248;http://localhost:5075",
28+
"environmentVariables": {
29+
"ASPNETCORE_ENVIRONMENT": "Development"
30+
}
31+
},
32+
"IIS Express": {
33+
"commandName": "IISExpress",
34+
"launchBrowser": true,
35+
"launchUrl": "swagger",
36+
"environmentVariables": {
37+
"ASPNETCORE_ENVIRONMENT": "Development"
38+
}
39+
}
40+
}
41+
}

appsettings.Development.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Information",
5+
"Microsoft.AspNetCore": "Warning"
6+
}
7+
}
8+
}

appsettings.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"Logging": {
3+
"LogLevel": {
4+
"Default": "Information",
5+
"Microsoft.AspNetCore": "Warning"
6+
}
7+
},
8+
"AllowedHosts": "*"
9+
}
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
{
2+
"runtimeTarget": {
3+
"name": ".NETCoreApp,Version=v8.0",
4+
"signature": ""
5+
},
6+
"compilationOptions": {},
7+
"targets": {
8+
".NETCoreApp,Version=v8.0": {
9+
"AzureTest/1.0.0": {
10+
"dependencies": {
11+
"Microsoft.AspNetCore.OpenApi": "8.0.11",
12+
"Swashbuckle.AspNetCore": "6.6.2"
13+
},
14+
"runtime": {
15+
"AzureTest.dll": {}
16+
}
17+
},
18+
"Microsoft.AspNetCore.OpenApi/8.0.11": {
19+
"dependencies": {
20+
"Microsoft.OpenApi": "1.6.14"
21+
},
22+
"runtime": {
23+
"lib/net8.0/Microsoft.AspNetCore.OpenApi.dll": {
24+
"assemblyVersion": "8.0.11.0",
25+
"fileVersion": "8.0.1124.52116"
26+
}
27+
}
28+
},
29+
"Microsoft.Extensions.ApiDescription.Server/6.0.5": {},
30+
"Microsoft.OpenApi/1.6.14": {
31+
"runtime": {
32+
"lib/netstandard2.0/Microsoft.OpenApi.dll": {
33+
"assemblyVersion": "1.6.14.0",
34+
"fileVersion": "1.6.14.0"
35+
}
36+
}
37+
},
38+
"Swashbuckle.AspNetCore/6.6.2": {
39+
"dependencies": {
40+
"Microsoft.Extensions.ApiDescription.Server": "6.0.5",
41+
"Swashbuckle.AspNetCore.Swagger": "6.6.2",
42+
"Swashbuckle.AspNetCore.SwaggerGen": "6.6.2",
43+
"Swashbuckle.AspNetCore.SwaggerUI": "6.6.2"
44+
}
45+
},
46+
"Swashbuckle.AspNetCore.Swagger/6.6.2": {
47+
"dependencies": {
48+
"Microsoft.OpenApi": "1.6.14"
49+
},
50+
"runtime": {
51+
"lib/net8.0/Swashbuckle.AspNetCore.Swagger.dll": {
52+
"assemblyVersion": "6.6.2.0",
53+
"fileVersion": "6.6.2.401"
54+
}
55+
}
56+
},
57+
"Swashbuckle.AspNetCore.SwaggerGen/6.6.2": {
58+
"dependencies": {
59+
"Swashbuckle.AspNetCore.Swagger": "6.6.2"
60+
},
61+
"runtime": {
62+
"lib/net8.0/Swashbuckle.AspNetCore.SwaggerGen.dll": {
63+
"assemblyVersion": "6.6.2.0",
64+
"fileVersion": "6.6.2.401"
65+
}
66+
}
67+
},
68+
"Swashbuckle.AspNetCore.SwaggerUI/6.6.2": {
69+
"runtime": {
70+
"lib/net8.0/Swashbuckle.AspNetCore.SwaggerUI.dll": {
71+
"assemblyVersion": "6.6.2.0",
72+
"fileVersion": "6.6.2.401"
73+
}
74+
}
75+
}
76+
}
77+
},
78+
"libraries": {
79+
"AzureTest/1.0.0": {
80+
"type": "project",
81+
"serviceable": false,
82+
"sha512": ""
83+
},
84+
"Microsoft.AspNetCore.OpenApi/8.0.11": {
85+
"type": "package",
86+
"serviceable": true,
87+
"sha512": "sha512-1WCvCZpqvOAyul6upSJ8Rkb/QHdr4PLrDny26vFexya/nTkG3x2zt8j9qlJ5T3J+/yJD9KwlGKhho9ZDD/YiFA==",
88+
"path": "microsoft.aspnetcore.openapi/8.0.11",
89+
"hashPath": "microsoft.aspnetcore.openapi.8.0.11.nupkg.sha512"
90+
},
91+
"Microsoft.Extensions.ApiDescription.Server/6.0.5": {
92+
"type": "package",
93+
"serviceable": true,
94+
"sha512": "sha512-Ckb5EDBUNJdFWyajfXzUIMRkhf52fHZOQuuZg/oiu8y7zDCVwD0iHhew6MnThjHmevanpxL3f5ci2TtHQEN6bw==",
95+
"path": "microsoft.extensions.apidescription.server/6.0.5",
96+
"hashPath": "microsoft.extensions.apidescription.server.6.0.5.nupkg.sha512"
97+
},
98+
"Microsoft.OpenApi/1.6.14": {
99+
"type": "package",
100+
"serviceable": true,
101+
"sha512": "sha512-tTaBT8qjk3xINfESyOPE2rIellPvB7qpVqiWiyA/lACVvz+xOGiXhFUfohcx82NLbi5avzLW0lx+s6oAqQijfw==",
102+
"path": "microsoft.openapi/1.6.14",
103+
"hashPath": "microsoft.openapi.1.6.14.nupkg.sha512"
104+
},
105+
"Swashbuckle.AspNetCore/6.6.2": {
106+
"type": "package",
107+
"serviceable": true,
108+
"sha512": "sha512-+NB4UYVYN6AhDSjW0IJAd1AGD8V33gemFNLPaxKTtPkHB+HaKAKf9MGAEUPivEWvqeQfcKIw8lJaHq6LHljRuw==",
109+
"path": "swashbuckle.aspnetcore/6.6.2",
110+
"hashPath": "swashbuckle.aspnetcore.6.6.2.nupkg.sha512"
111+
},
112+
"Swashbuckle.AspNetCore.Swagger/6.6.2": {
113+
"type": "package",
114+
"serviceable": true,
115+
"sha512": "sha512-ovgPTSYX83UrQUWiS5vzDcJ8TEX1MAxBgDFMK45rC24MorHEPQlZAHlaXj/yth4Zf6xcktpUgTEBvffRQVwDKA==",
116+
"path": "swashbuckle.aspnetcore.swagger/6.6.2",
117+
"hashPath": "swashbuckle.aspnetcore.swagger.6.6.2.nupkg.sha512"
118+
},
119+
"Swashbuckle.AspNetCore.SwaggerGen/6.6.2": {
120+
"type": "package",
121+
"serviceable": true,
122+
"sha512": "sha512-zv4ikn4AT1VYuOsDCpktLq4QDq08e7Utzbir86M5/ZkRaLXbCPF11E1/vTmOiDzRTl0zTZINQU2qLKwTcHgfrA==",
123+
"path": "swashbuckle.aspnetcore.swaggergen/6.6.2",
124+
"hashPath": "swashbuckle.aspnetcore.swaggergen.6.6.2.nupkg.sha512"
125+
},
126+
"Swashbuckle.AspNetCore.SwaggerUI/6.6.2": {
127+
"type": "package",
128+
"serviceable": true,
129+
"sha512": "sha512-mBBb+/8Hm2Q3Wygag+hu2jj69tZW5psuv0vMRXY07Wy+Rrj40vRP8ZTbKBhs91r45/HXT4aY4z0iSBYx1h6JvA==",
130+
"path": "swashbuckle.aspnetcore.swaggerui/6.6.2",
131+
"hashPath": "swashbuckle.aspnetcore.swaggerui.6.6.2.nupkg.sha512"
132+
}
133+
}
134+
}

bin/Debug/net8.0/AzureTest.dll

10.5 KB
Binary file not shown.

bin/Debug/net8.0/AzureTest.exe

136 KB
Binary file not shown.

0 commit comments

Comments
 (0)