From a5d9aa81096924edc82d8cc7186571ab1ccfeb74 Mon Sep 17 00:00:00 2001 From: James Tombleson Date: Tue, 6 Jun 2023 22:51:21 -0700 Subject: [PATCH] sln is setup with projects added --- jtom38.OpenCloud.Api.sln | 46 +++++++++++++++++++ .../Controllers/WeatherForecastController.cs | 32 +++++++++++++ jtom38.OpenCloud.Api/Program.cs | 25 ++++++++++ .../Properties/launchSettings.json | 41 +++++++++++++++++ jtom38.OpenCloud.Api/WeatherForecast.cs | 12 +++++ .../appsettings.Development.json | 8 ++++ jtom38.OpenCloud.Api/appsettings.json | 9 ++++ .../jtom38.OpenCloud.Api.csproj | 14 ++++++ jtom38.OpenCloud.Domain/Class1.cs | 5 ++ .../jtom38.OpenCloud.Domain.csproj | 9 ++++ jtom38.OpenCloud.Repository/Class1.cs | 5 ++ .../jtom38.OpenCloud.Repository.csproj | 9 ++++ jtom38.OpenCloud.Services/Class1.cs | 5 ++ .../jtom38.OpenCloud.Services.csproj | 9 ++++ jtom38.OpenCloud.Tests/UnitTest1.cs | 10 ++++ jtom38.OpenCloud.Tests/Usings.cs | 1 + .../jtom38.OpenCloud.Tests.csproj | 24 ++++++++++ 17 files changed, 264 insertions(+) create mode 100644 jtom38.OpenCloud.Api.sln create mode 100644 jtom38.OpenCloud.Api/Controllers/WeatherForecastController.cs create mode 100644 jtom38.OpenCloud.Api/Program.cs create mode 100644 jtom38.OpenCloud.Api/Properties/launchSettings.json create mode 100644 jtom38.OpenCloud.Api/WeatherForecast.cs create mode 100644 jtom38.OpenCloud.Api/appsettings.Development.json create mode 100644 jtom38.OpenCloud.Api/appsettings.json create mode 100644 jtom38.OpenCloud.Api/jtom38.OpenCloud.Api.csproj create mode 100644 jtom38.OpenCloud.Domain/Class1.cs create mode 100644 jtom38.OpenCloud.Domain/jtom38.OpenCloud.Domain.csproj create mode 100644 jtom38.OpenCloud.Repository/Class1.cs create mode 100644 jtom38.OpenCloud.Repository/jtom38.OpenCloud.Repository.csproj create mode 100644 jtom38.OpenCloud.Services/Class1.cs create mode 100644 jtom38.OpenCloud.Services/jtom38.OpenCloud.Services.csproj create mode 100644 jtom38.OpenCloud.Tests/UnitTest1.cs create mode 100644 jtom38.OpenCloud.Tests/Usings.cs create mode 100644 jtom38.OpenCloud.Tests/jtom38.OpenCloud.Tests.csproj diff --git a/jtom38.OpenCloud.Api.sln b/jtom38.OpenCloud.Api.sln new file mode 100644 index 0000000..c0e9aab --- /dev/null +++ b/jtom38.OpenCloud.Api.sln @@ -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 diff --git a/jtom38.OpenCloud.Api/Controllers/WeatherForecastController.cs b/jtom38.OpenCloud.Api/Controllers/WeatherForecastController.cs new file mode 100644 index 0000000..2419041 --- /dev/null +++ b/jtom38.OpenCloud.Api/Controllers/WeatherForecastController.cs @@ -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 _logger; + + public WeatherForecastController(ILogger logger) + { + _logger = logger; + } + + [HttpGet(Name = "GetWeatherForecast")] + public IEnumerable 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(); + } +} diff --git a/jtom38.OpenCloud.Api/Program.cs b/jtom38.OpenCloud.Api/Program.cs new file mode 100644 index 0000000..48863a6 --- /dev/null +++ b/jtom38.OpenCloud.Api/Program.cs @@ -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(); diff --git a/jtom38.OpenCloud.Api/Properties/launchSettings.json b/jtom38.OpenCloud.Api/Properties/launchSettings.json new file mode 100644 index 0000000..3d862cb --- /dev/null +++ b/jtom38.OpenCloud.Api/Properties/launchSettings.json @@ -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" + } + } + } +} diff --git a/jtom38.OpenCloud.Api/WeatherForecast.cs b/jtom38.OpenCloud.Api/WeatherForecast.cs new file mode 100644 index 0000000..eb5c92e --- /dev/null +++ b/jtom38.OpenCloud.Api/WeatherForecast.cs @@ -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; } +} diff --git a/jtom38.OpenCloud.Api/appsettings.Development.json b/jtom38.OpenCloud.Api/appsettings.Development.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/jtom38.OpenCloud.Api/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/jtom38.OpenCloud.Api/appsettings.json b/jtom38.OpenCloud.Api/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/jtom38.OpenCloud.Api/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/jtom38.OpenCloud.Api/jtom38.OpenCloud.Api.csproj b/jtom38.OpenCloud.Api/jtom38.OpenCloud.Api.csproj new file mode 100644 index 0000000..ce90fce --- /dev/null +++ b/jtom38.OpenCloud.Api/jtom38.OpenCloud.Api.csproj @@ -0,0 +1,14 @@ + + + + net7.0 + enable + enable + + + + + + + + diff --git a/jtom38.OpenCloud.Domain/Class1.cs b/jtom38.OpenCloud.Domain/Class1.cs new file mode 100644 index 0000000..db7c7b7 --- /dev/null +++ b/jtom38.OpenCloud.Domain/Class1.cs @@ -0,0 +1,5 @@ +namespace jtom38.OpenCloud.Domain; +public class Class1 +{ + +} diff --git a/jtom38.OpenCloud.Domain/jtom38.OpenCloud.Domain.csproj b/jtom38.OpenCloud.Domain/jtom38.OpenCloud.Domain.csproj new file mode 100644 index 0000000..cfadb03 --- /dev/null +++ b/jtom38.OpenCloud.Domain/jtom38.OpenCloud.Domain.csproj @@ -0,0 +1,9 @@ + + + + net7.0 + enable + enable + + + diff --git a/jtom38.OpenCloud.Repository/Class1.cs b/jtom38.OpenCloud.Repository/Class1.cs new file mode 100644 index 0000000..da0de13 --- /dev/null +++ b/jtom38.OpenCloud.Repository/Class1.cs @@ -0,0 +1,5 @@ +namespace jtom38.OpenCloud.Repository; +public class Class1 +{ + +} diff --git a/jtom38.OpenCloud.Repository/jtom38.OpenCloud.Repository.csproj b/jtom38.OpenCloud.Repository/jtom38.OpenCloud.Repository.csproj new file mode 100644 index 0000000..cfadb03 --- /dev/null +++ b/jtom38.OpenCloud.Repository/jtom38.OpenCloud.Repository.csproj @@ -0,0 +1,9 @@ + + + + net7.0 + enable + enable + + + diff --git a/jtom38.OpenCloud.Services/Class1.cs b/jtom38.OpenCloud.Services/Class1.cs new file mode 100644 index 0000000..ef34a44 --- /dev/null +++ b/jtom38.OpenCloud.Services/Class1.cs @@ -0,0 +1,5 @@ +namespace jtom38.OpenCloud.Services; +public class Class1 +{ + +} diff --git a/jtom38.OpenCloud.Services/jtom38.OpenCloud.Services.csproj b/jtom38.OpenCloud.Services/jtom38.OpenCloud.Services.csproj new file mode 100644 index 0000000..cfadb03 --- /dev/null +++ b/jtom38.OpenCloud.Services/jtom38.OpenCloud.Services.csproj @@ -0,0 +1,9 @@ + + + + net7.0 + enable + enable + + + diff --git a/jtom38.OpenCloud.Tests/UnitTest1.cs b/jtom38.OpenCloud.Tests/UnitTest1.cs new file mode 100644 index 0000000..3a99ffe --- /dev/null +++ b/jtom38.OpenCloud.Tests/UnitTest1.cs @@ -0,0 +1,10 @@ +namespace jtom38.OpenCloud.Tests; + +public class UnitTest1 +{ + [Fact] + public void Test1() + { + + } +} \ No newline at end of file diff --git a/jtom38.OpenCloud.Tests/Usings.cs b/jtom38.OpenCloud.Tests/Usings.cs new file mode 100644 index 0000000..8c927eb --- /dev/null +++ b/jtom38.OpenCloud.Tests/Usings.cs @@ -0,0 +1 @@ +global using Xunit; \ No newline at end of file diff --git a/jtom38.OpenCloud.Tests/jtom38.OpenCloud.Tests.csproj b/jtom38.OpenCloud.Tests/jtom38.OpenCloud.Tests.csproj new file mode 100644 index 0000000..9928ef5 --- /dev/null +++ b/jtom38.OpenCloud.Tests/jtom38.OpenCloud.Tests.csproj @@ -0,0 +1,24 @@ + + + + net7.0 + enable + enable + + false + + + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + + + +