feats: 添加项目

main
bicijinlian 2 years ago
parent 832617da5d
commit d32e990ab9

@ -0,0 +1,3 @@
项目说明
========
本项目是MinIO分布式存储的学习项目。

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\MinioStudy.Core\MinioStudy.Core.csproj" />
</ItemGroup>
</Project>

@ -0,0 +1,10 @@
namespace MinioStudy.CApp
{
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello, World!");
}
}
}

@ -0,0 +1,8 @@
{
"Description": "MinIO配置项",
"Server": "loclhost",
"Port": 9000,
"AccessToken": "sdfsdf",
"Srcirt0": "sss"
}

@ -0,0 +1,12 @@
using System;
namespace MinioStudy.Core
{
/// <summary>
/// MinIO 配置项
/// </summary>
public class MinioOption
{
}
}

@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Minio" Version="5.0.0" />
</ItemGroup>
</Project>

@ -0,0 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<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.2.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MinioStudy.Core\MinioStudy.Core.csproj" />
</ItemGroup>
</Project>

@ -0,0 +1,11 @@
namespace MinioStudy.CoreTest
{
public class UseXunit
{
[Fact]
public void Test1()
{
}
}
}

@ -0,0 +1 @@
global using Xunit;

@ -0,0 +1,33 @@
using Microsoft.AspNetCore.Mvc;
namespace MinioStudy.WebApp.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();
}
}
}

@ -0,0 +1,23 @@
<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.9" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MinioStudy.Core\MinioStudy.Core.csproj" />
</ItemGroup>
</Project>

@ -0,0 +1,34 @@
namespace MinioStudy.WebApp
{
public class Program
{
public static void Main(string[] args)
{
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.UseAuthorization();
app.MapControllers();
app.Run();
}
}
}

@ -0,0 +1,31 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:40635",
"sslPort": 0
}
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5015",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

@ -0,0 +1,13 @@
namespace MinioStudy.WebApp
{
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; }
}
}

@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}

@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}

@ -0,0 +1,58 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.6.33829.357
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinioStudy.Core", "MinioStudy.Core\MinioStudy.Core.csproj", "{89E5003D-17F8-4748-8CF6-BAA338979385}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinioStudy.CoreTest", "MinioStudy.CoreTest\MinioStudy.CoreTest.csproj", "{51F4906C-6B10-4DDC-A544-ABB2ABFA8CD8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Src", "Src", "{54C09CE6-0822-449C-9FB3-5A2069CF54FF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{6BDA1DB1-130F-4891-961A-2F658EF98E0C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{008B9CAF-135A-48F3-AA9E-1B59AF4D681E}"
ProjectSection(SolutionItems) = preProject
Docs\说明.md = Docs\说明.md
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinioStudy.WebApp", "MinioStudy.WebApp\MinioStudy.WebApp.csproj", "{A36D7791-D6F3-4806-A17B-82CEC32B35FC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinioStudy.CApp", "MinioStudy.CApp\MinioStudy.CApp.csproj", "{FD675BC2-CF35-431E-B38A-E2E7005BC5FC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{89E5003D-17F8-4748-8CF6-BAA338979385}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{89E5003D-17F8-4748-8CF6-BAA338979385}.Debug|Any CPU.Build.0 = Debug|Any CPU
{89E5003D-17F8-4748-8CF6-BAA338979385}.Release|Any CPU.ActiveCfg = Release|Any CPU
{89E5003D-17F8-4748-8CF6-BAA338979385}.Release|Any CPU.Build.0 = Release|Any CPU
{51F4906C-6B10-4DDC-A544-ABB2ABFA8CD8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{51F4906C-6B10-4DDC-A544-ABB2ABFA8CD8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{51F4906C-6B10-4DDC-A544-ABB2ABFA8CD8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{51F4906C-6B10-4DDC-A544-ABB2ABFA8CD8}.Release|Any CPU.Build.0 = Release|Any CPU
{A36D7791-D6F3-4806-A17B-82CEC32B35FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A36D7791-D6F3-4806-A17B-82CEC32B35FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A36D7791-D6F3-4806-A17B-82CEC32B35FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A36D7791-D6F3-4806-A17B-82CEC32B35FC}.Release|Any CPU.Build.0 = Release|Any CPU
{FD675BC2-CF35-431E-B38A-E2E7005BC5FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FD675BC2-CF35-431E-B38A-E2E7005BC5FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FD675BC2-CF35-431E-B38A-E2E7005BC5FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FD675BC2-CF35-431E-B38A-E2E7005BC5FC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{89E5003D-17F8-4748-8CF6-BAA338979385} = {54C09CE6-0822-449C-9FB3-5A2069CF54FF}
{51F4906C-6B10-4DDC-A544-ABB2ABFA8CD8} = {6BDA1DB1-130F-4891-961A-2F658EF98E0C}
{A36D7791-D6F3-4806-A17B-82CEC32B35FC} = {54C09CE6-0822-449C-9FB3-5A2069CF54FF}
{FD675BC2-CF35-431E-B38A-E2E7005BC5FC} = {54C09CE6-0822-449C-9FB3-5A2069CF54FF}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {7EE68A77-C860-4FAA-B16D-1486BC090795}
EndGlobalSection
EndGlobal
Loading…
Cancel
Save