浏览代码

initial project

master
stevelee 2 年前
当前提交
65d26ea02f
共有 13 个文件被更改,包括 456 次插入0 次删除
  1. +266
    -0
      .gitignore
  2. +37
    -0
      BPA.SaaS.Gateway.Api.sln
  3. +1
    -0
      README.md
  4. +9
    -0
      src/BPA.SaaS.Gateway.Api/BPA.SaaS.Gateway.Api.csproj
  5. +33
    -0
      src/BPA.SaaS.Gateway.Api/Controllers/WeatherForecastController.cs
  6. +17
    -0
      src/BPA.SaaS.Gateway.Api/Program.cs
  7. +31
    -0
      src/BPA.SaaS.Gateway.Api/Properties/launchSettings.json
  8. +13
    -0
      src/BPA.SaaS.Gateway.Api/WeatherForecast.cs
  9. +8
    -0
      src/BPA.SaaS.Gateway.Api/appsettings.Development.json
  10. +9
    -0
      src/BPA.SaaS.Gateway.Api/appsettings.json
  11. +9
    -0
      src/BPA.SaaS.Gateway.Bootstrap/BPA.SaaS.Gateway.Bootstrap.csproj
  12. +9
    -0
      src/BPA.SaaS.Gateway.DTO/BPA.SaaS.Gateway.DTO.csproj
  13. +14
    -0
      src/nuget.config

+ 266
- 0
.gitignore 查看文件

@@ -0,0 +1,266 @@
################################################################################
# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。
################################################################################

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/

# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

# DNX
project.lock.json
project.fragment.lock.json
artifacts/

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb

# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding add-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
#*.pubxml
*.publishproj

# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/

# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files
*.nuget.props
*.nuget.targets

# Microsoft Azure Build Output
csx/
*.build.csdef

# Microsoft Azure Emulator
ecf/
rcf/

# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt

# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/

# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs

# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
*.mdf
*.ldf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/

# GhostDoc plugin setting file
*.GhostDoc.xml

# Node.js Tools for Visual Studio
.ntvs_analysis.dat

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt

# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions

# Paket dependency manager
.paket/paket.exe
paket-files/

# FAKE - F# Make
.fake/

# JetBrains Rider
.idea/
*.sln.iml

# CodeRush
.cr/

# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc


+ 37
- 0
BPA.SaaS.Gateway.Api.sln 查看文件

@@ -0,0 +1,37 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32228.430
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BPA.SaaS.Gateway.Api", "src\BPA.SaaS.Gateway.Api\BPA.SaaS.Gateway.Api.csproj", "{B9E6691B-8AFF-4628-A04C-29B2B1622739}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BPA.SaaS.Gateway.DTO", "src\BPA.SaaS.Gateway.DTO\BPA.SaaS.Gateway.DTO.csproj", "{CF5A23AA-D96A-427E-A4D5-7BE48C057523}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BPA.SaaS.Gateway.Bootstrap", "src\BPA.SaaS.Gateway.Bootstrap\BPA.SaaS.Gateway.Bootstrap.csproj", "{2C318709-38D1-4EBC-8950-F6F2047E9E9E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B9E6691B-8AFF-4628-A04C-29B2B1622739}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B9E6691B-8AFF-4628-A04C-29B2B1622739}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B9E6691B-8AFF-4628-A04C-29B2B1622739}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B9E6691B-8AFF-4628-A04C-29B2B1622739}.Release|Any CPU.Build.0 = Release|Any CPU
{CF5A23AA-D96A-427E-A4D5-7BE48C057523}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CF5A23AA-D96A-427E-A4D5-7BE48C057523}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CF5A23AA-D96A-427E-A4D5-7BE48C057523}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CF5A23AA-D96A-427E-A4D5-7BE48C057523}.Release|Any CPU.Build.0 = Release|Any CPU
{2C318709-38D1-4EBC-8950-F6F2047E9E9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2C318709-38D1-4EBC-8950-F6F2047E9E9E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2C318709-38D1-4EBC-8950-F6F2047E9E9E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2C318709-38D1-4EBC-8950-F6F2047E9E9E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {AE050242-B7E2-4218-BA63-6859CD433A7F}
EndGlobalSection
EndGlobal

+ 1
- 0
README.md 查看文件

@@ -0,0 +1 @@
# BPA.Project

+ 9
- 0
src/BPA.SaaS.Gateway.Api/BPA.SaaS.Gateway.Api.csproj 查看文件

@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

</Project>

+ 33
- 0
src/BPA.SaaS.Gateway.Api/Controllers/WeatherForecastController.cs 查看文件

@@ -0,0 +1,33 @@
using Microsoft.AspNetCore.Mvc;

namespace BPA.SaaS.Gateway.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]
public IEnumerable<WeatherForecast> Get()
{
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = DateTime.Now.AddDays(index),
TemperatureC = Random.Shared.Next(-20, 55),
Summary = Summaries[Random.Shared.Next(Summaries.Length)]
})
.ToArray();
}
}
}

+ 17
- 0
src/BPA.SaaS.Gateway.Api/Program.cs 查看文件

@@ -0,0 +1,17 @@
var builder = WebApplication.CreateBuilder(args);

// Add services to the container.

builder.Services.AddControllers();

var app = builder.Build();

// Configure the HTTP request pipeline.

app.UseHttpsRedirection();

app.UseAuthorization();

app.MapControllers();

app.Run();

+ 31
- 0
src/BPA.SaaS.Gateway.Api/Properties/launchSettings.json 查看文件

@@ -0,0 +1,31 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:1296",
"sslPort": 44300
}
},
"profiles": {
"BPA.SaaS.Gateway.Api": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "weatherforecast",
"applicationUrl": "https://localhost:7001;http://localhost:5001",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "weatherforecast",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

+ 13
- 0
src/BPA.SaaS.Gateway.Api/WeatherForecast.cs 查看文件

@@ -0,0 +1,13 @@
namespace BPA.SaaS.Gateway.Api
{
public class WeatherForecast
{
public DateTime Date { get; set; }

public int TemperatureC { get; set; }

public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);

public string? Summary { get; set; }
}
}

+ 8
- 0
src/BPA.SaaS.Gateway.Api/appsettings.Development.json 查看文件

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

+ 9
- 0
src/BPA.SaaS.Gateway.Api/appsettings.json 查看文件

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

+ 9
- 0
src/BPA.SaaS.Gateway.Bootstrap/BPA.SaaS.Gateway.Bootstrap.csproj 查看文件

@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>

+ 9
- 0
src/BPA.SaaS.Gateway.DTO/BPA.SaaS.Gateway.DTO.csproj 查看文件

@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>

+ 14
- 0
src/nuget.config 查看文件

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>

<configuration>
<config>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="bpa.com" value="http://10.2.1.25:10243/repository/bpa/index.json" />
</config>
<packageSources>
<add key="bpa.com" value="http://10.2.1.25:10243/repository/bpa/index.json" />
</packageSources>
<apikeys>
<add key="http://10.2.1.25:10243/repository/bpa/" value="83d77c57-167d-304e-a42e-7d0470fca3a5" />
</apikeys>
</configuration>

正在加载...
取消
保存