Skip to content

Commit 7af5fb1

Browse files
committed
Initial commit
1 parent 46ebe27 commit 7af5fb1

11 files changed

Lines changed: 793 additions & 0 deletions

‎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:48461",
8+
"sslPort": 44385
9+
}
10+
},
11+
"profiles": {
12+
"http": {
13+
"commandName": "Project",
14+
"dotnetRunMessages": true,
15+
"launchBrowser": true,
16+
"launchUrl": "swagger",
17+
"applicationUrl": "http://localhost:5054",
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:7207;http://localhost:5054",
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+
}

‎Taskify.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.18" />
11+
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
12+
</ItemGroup>
13+
14+
</Project>

‎Taskify.http‎

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

‎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: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"format": 1,
3+
"restore": {
4+
"/home/button99/Taskify/Taskify.csproj": {}
5+
},
6+
"projects": {
7+
"/home/button99/Taskify/Taskify.csproj": {
8+
"version": "1.0.0",
9+
"restore": {
10+
"projectUniqueName": "/home/button99/Taskify/Taskify.csproj",
11+
"projectName": "Taskify",
12+
"projectPath": "/home/button99/Taskify/Taskify.csproj",
13+
"packagesPath": "/home/button99/.nuget/packages/",
14+
"outputPath": "/home/button99/Taskify/obj/",
15+
"projectStyle": "PackageReference",
16+
"configFilePaths": [
17+
"/home/button99/.nuget/NuGet/NuGet.Config"
18+
],
19+
"originalTargetFrameworks": [
20+
"net8.0"
21+
],
22+
"sources": {
23+
"https://api.nuget.org/v3/index.json": {}
24+
},
25+
"frameworks": {
26+
"net8.0": {
27+
"targetAlias": "net8.0",
28+
"projectReferences": {}
29+
}
30+
},
31+
"warningProperties": {
32+
"warnAsError": [
33+
"NU1605"
34+
]
35+
}
36+
},
37+
"frameworks": {
38+
"net8.0": {
39+
"targetAlias": "net8.0",
40+
"dependencies": {
41+
"Microsoft.AspNetCore.OpenApi": {
42+
"target": "Package",
43+
"version": "[8.0.18, )"
44+
},
45+
"Swashbuckle.AspNetCore": {
46+
"target": "Package",
47+
"version": "[6.6.2, )"
48+
}
49+
},
50+
"imports": [
51+
"net461",
52+
"net462",
53+
"net47",
54+
"net471",
55+
"net472",
56+
"net48",
57+
"net481"
58+
],
59+
"assetTargetFallback": true,
60+
"warn": true,
61+
"frameworkReferences": {
62+
"Microsoft.AspNetCore.App": {
63+
"privateAssets": "none"
64+
},
65+
"Microsoft.NETCore.App": {
66+
"privateAssets": "all"
67+
}
68+
},
69+
"runtimeIdentifierGraphPath": "/usr/lib/dotnet/sdk/8.0.118/PortableRuntimeIdentifierGraph.json"
70+
}
71+
}
72+
}
73+
}
74+
}

‎obj/Taskify.csproj.nuget.g.props‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2+
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
4+
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
5+
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
6+
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
7+
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/button99/.nuget/packages/</NuGetPackageRoot>
8+
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/button99/.nuget/packages/</NuGetPackageFolders>
9+
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
10+
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.8.1</NuGetToolVersion>
11+
</PropertyGroup>
12+
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
13+
<SourceRoot Include="/home/button99/.nuget/packages/" />
14+
</ItemGroup>
15+
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
16+
<Import Project="$(NuGetPackageRoot)microsoft.extensions.apidescription.server/6.0.5/build/Microsoft.Extensions.ApiDescription.Server.props" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.apidescription.server/6.0.5/build/Microsoft.Extensions.ApiDescription.Server.props')" />
17+
<Import Project="$(NuGetPackageRoot)swashbuckle.aspnetcore/6.6.2/build/Swashbuckle.AspNetCore.props" Condition="Exists('$(NuGetPackageRoot)swashbuckle.aspnetcore/6.6.2/build/Swashbuckle.AspNetCore.props')" />
18+
</ImportGroup>
19+
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
20+
<PkgMicrosoft_Extensions_ApiDescription_Server Condition=" '$(PkgMicrosoft_Extensions_ApiDescription_Server)' == '' ">/home/button99/.nuget/packages/microsoft.extensions.apidescription.server/6.0.5</PkgMicrosoft_Extensions_ApiDescription_Server>
21+
</PropertyGroup>
22+
</Project>

‎obj/Taskify.csproj.nuget.g.targets‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2+
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
4+
<Import Project="$(NuGetPackageRoot)microsoft.extensions.apidescription.server/6.0.5/build/Microsoft.Extensions.ApiDescription.Server.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.apidescription.server/6.0.5/build/Microsoft.Extensions.ApiDescription.Server.targets')" />
5+
</ImportGroup>
6+
</Project>

0 commit comments

Comments
 (0)