This commit is contained in:
hello 2024-03-06 16:39:06 +08:00
commit e6a75861ff
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,34 @@
# 在项目中添加文件头注释
## 文件头注释
文件头注释是一种用于说明文件版权和许可的注释。它通常包括版权声明、许可证信息、作者信息和其他相关信息。文件头注释是一种很好的实践,可以帮助开发人员了解文件的版权和许可信息。
## 版权申明规范
```csharp
// Copyright (c) HelloShop Corporation. All rights reserved.
// See the license file in the project root for more information.
namespace HelloShop.AppHost
{
internal class Class1
{
}
}
```
## 关于 EditorConfig 配置文件
为跨不同编辑器和 IDE 处理同一项目的多个开发人员保持一致的编码风格。
Visual Studio 2019 及更高版本支持 EditorConfig 文件,可以在 Visual Studio 中使用 EditorConfig 文件来定义和维护代码样式设置。
## 版权说明模板
```
file_header_template = Copyright (c) HelloShop Corporation. All rights reserved.\nSee the license file in the project root for more information.
```
对于文件名,可以使用 `{fileName}` 作为占位符。

View File

@ -4,6 +4,7 @@ Swagger 是一个与语言无关的规范,用于描述 REST API。 它使计
Swashbuckle 是一个用于 .NET Core 的开源项目,它是 OpenAPI 工具的集合,用于生成 OpenAPI 规范的文档。 它可以自动生成 API 文档,包括 API 的描述、请求和响应的格式、参数的描述等。
## 安装 Swashbuckle.AspNetCore
在 .NET Core 项目中,可以通过 NuGet 安装 Swashbuckle.AspNetCore 包。