Compare commits
1 Commits
main
...
features/s
Author | SHA1 | Date | |
---|---|---|---|
a5d9aa8109 |
46
jtom38.OpenCloud.Api.sln
Normal file
46
jtom38.OpenCloud.Api.sln
Normal file
@ -0,0 +1,46 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31903.59
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "jtom38.OpenCloud.Api", "jtom38.OpenCloud.Api\jtom38.OpenCloud.Api.csproj", "{E2F3DB5D-816D-464E-BA6C-D4CC2D0C3689}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "jtom38.OpenCloud.Domain", "jtom38.OpenCloud.Domain\jtom38.OpenCloud.Domain.csproj", "{D67398C0-EC7B-4979-A3D3-BC43806FC145}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "jtom38.OpenCloud.Services", "jtom38.OpenCloud.Services\jtom38.OpenCloud.Services.csproj", "{BDA62B3B-1513-4B47-A6AC-900419282309}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "jtom38.OpenCloud.Tests", "jtom38.OpenCloud.Tests\jtom38.OpenCloud.Tests.csproj", "{B8270222-8B75-4ECA-96F7-4C36EEC01005}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "jtom38.OpenCloud.Repository", "jtom38.OpenCloud.Repository\jtom38.OpenCloud.Repository.csproj", "{10379973-6F38-4065-97BE-388191182AEB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E2F3DB5D-816D-464E-BA6C-D4CC2D0C3689}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E2F3DB5D-816D-464E-BA6C-D4CC2D0C3689}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E2F3DB5D-816D-464E-BA6C-D4CC2D0C3689}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E2F3DB5D-816D-464E-BA6C-D4CC2D0C3689}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D67398C0-EC7B-4979-A3D3-BC43806FC145}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D67398C0-EC7B-4979-A3D3-BC43806FC145}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D67398C0-EC7B-4979-A3D3-BC43806FC145}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D67398C0-EC7B-4979-A3D3-BC43806FC145}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BDA62B3B-1513-4B47-A6AC-900419282309}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BDA62B3B-1513-4B47-A6AC-900419282309}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BDA62B3B-1513-4B47-A6AC-900419282309}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BDA62B3B-1513-4B47-A6AC-900419282309}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B8270222-8B75-4ECA-96F7-4C36EEC01005}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B8270222-8B75-4ECA-96F7-4C36EEC01005}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B8270222-8B75-4ECA-96F7-4C36EEC01005}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B8270222-8B75-4ECA-96F7-4C36EEC01005}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{10379973-6F38-4065-97BE-388191182AEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{10379973-6F38-4065-97BE-388191182AEB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{10379973-6F38-4065-97BE-388191182AEB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{10379973-6F38-4065-97BE-388191182AEB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -0,0 +1,32 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace jtom38.OpenCloud.Api.Controllers;
|
||||
|
||||
[ApiController]
|
||||
[Route("[controller]")]
|
||||
public class WeatherForecastController : ControllerBase
|
||||
{
|
||||
private static readonly string[] Summaries = new[]
|
||||
{
|
||||
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
|
||||
};
|
||||
|
||||
private readonly ILogger<WeatherForecastController> _logger;
|
||||
|
||||
public WeatherForecastController(ILogger<WeatherForecastController> logger)
|
||||
{
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
[HttpGet(Name = "GetWeatherForecast")]
|
||||
public IEnumerable<WeatherForecast> Get()
|
||||
{
|
||||
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
|
||||
{
|
||||
Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
|
||||
TemperatureC = Random.Shared.Next(-20, 55),
|
||||
Summary = Summaries[Random.Shared.Next(Summaries.Length)]
|
||||
})
|
||||
.ToArray();
|
||||
}
|
||||
}
|
25
jtom38.OpenCloud.Api/Program.cs
Normal file
25
jtom38.OpenCloud.Api/Program.cs
Normal file
@ -0,0 +1,25 @@
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
|
||||
builder.Services.AddControllers();
|
||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
app.Run();
|
41
jtom38.OpenCloud.Api/Properties/launchSettings.json
Normal file
41
jtom38.OpenCloud.Api/Properties/launchSettings.json
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:46553",
|
||||
"sslPort": 44375
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"http": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "http://localhost:5069",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"https": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "https://localhost:7146;http://localhost:5069",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
12
jtom38.OpenCloud.Api/WeatherForecast.cs
Normal file
12
jtom38.OpenCloud.Api/WeatherForecast.cs
Normal file
@ -0,0 +1,12 @@
|
||||
namespace jtom38.OpenCloud.Api;
|
||||
|
||||
public class WeatherForecast
|
||||
{
|
||||
public DateOnly Date { get; set; }
|
||||
|
||||
public int TemperatureC { get; set; }
|
||||
|
||||
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
|
||||
|
||||
public string? Summary { get; set; }
|
||||
}
|
8
jtom38.OpenCloud.Api/appsettings.Development.json
Normal file
8
jtom38.OpenCloud.Api/appsettings.Development.json
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
9
jtom38.OpenCloud.Api/appsettings.json
Normal file
9
jtom38.OpenCloud.Api/appsettings.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
14
jtom38.OpenCloud.Api/jtom38.OpenCloud.Api.csproj
Normal file
14
jtom38.OpenCloud.Api/jtom38.OpenCloud.Api.csproj
Normal file
@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
5
jtom38.OpenCloud.Domain/Class1.cs
Normal file
5
jtom38.OpenCloud.Domain/Class1.cs
Normal file
@ -0,0 +1,5 @@
|
||||
namespace jtom38.OpenCloud.Domain;
|
||||
public class Class1
|
||||
{
|
||||
|
||||
}
|
9
jtom38.OpenCloud.Domain/jtom38.OpenCloud.Domain.csproj
Normal file
9
jtom38.OpenCloud.Domain/jtom38.OpenCloud.Domain.csproj
Normal file
@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
5
jtom38.OpenCloud.Repository/Class1.cs
Normal file
5
jtom38.OpenCloud.Repository/Class1.cs
Normal file
@ -0,0 +1,5 @@
|
||||
namespace jtom38.OpenCloud.Repository;
|
||||
public class Class1
|
||||
{
|
||||
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
5
jtom38.OpenCloud.Services/Class1.cs
Normal file
5
jtom38.OpenCloud.Services/Class1.cs
Normal file
@ -0,0 +1,5 @@
|
||||
namespace jtom38.OpenCloud.Services;
|
||||
public class Class1
|
||||
{
|
||||
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
10
jtom38.OpenCloud.Tests/UnitTest1.cs
Normal file
10
jtom38.OpenCloud.Tests/UnitTest1.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace jtom38.OpenCloud.Tests;
|
||||
|
||||
public class UnitTest1
|
||||
{
|
||||
[Fact]
|
||||
public void Test1()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
1
jtom38.OpenCloud.Tests/Usings.cs
Normal file
1
jtom38.OpenCloud.Tests/Usings.cs
Normal file
@ -0,0 +1 @@
|
||||
global using Xunit;
|
24
jtom38.OpenCloud.Tests/jtom38.OpenCloud.Tests.csproj
Normal file
24
jtom38.OpenCloud.Tests/jtom38.OpenCloud.Tests.csproj
Normal file
@ -0,0 +1,24 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
|
||||
<PackageReference Include="xunit" Version="2.4.2" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="coverlet.collector" Version="3.1.2">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user