提交代码

This commit is contained in:
zpc 2024-06-25 20:10:25 +08:00
parent cf7e1bf3e8
commit 370bc948d2
7 changed files with 46 additions and 18 deletions

View File

@ -0,0 +1,38 @@
root = true
# 全部文件
[*]
indent_style = space #指定缩进风格可以是tab制表符或space空格
# Xml files
[*.xml]
indent_size = 2 #定义一个缩进级别的大小。
[*.cs]
end_of_line = lf #指定换行符的类型可以是lfUnix/Linux、crlfWindows或cr老式的Mac OS
indent_style = space #指定缩进风格可以是tab制表符或space空格
charset = utf-8 #设置文件字符集为utf-8,在 Linux 系统中,通常推荐使用 UTF-8 而不是 UTF-8 with BOM。添加 BOM 可能会干扰那些不期望在文件开头出现非 ASCII 字节的软件对 UTF-8 的使用。
trim_trailing_whitespace = true #指定是否删除行尾的空白字符。
insert_final_newline = true #指定文件末尾是否应该插入一个空白行。
indent_size = 4
# 模式匹配的偏好设置
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion # 推荐使用模式匹配而非 is 与类型转换检查
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion # 推荐使用模式匹配而非 as 与 null 检查
# 空检查的偏好设置
csharp_style_throw_expression = true:suggestion # 推荐使用 throw 表达式
csharp_style_conditional_delegate_call = true:suggestion # 推荐使用条件委托调用
# 修饰符的偏好设置
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async:suggestion # 修饰符的推荐顺序
# 表达式级别的偏好设置
csharp_prefer_braces = true:silent # 推荐使用大括号,即使在可能省略的情况下
csharp_style_deconstructed_variable_declaration = true:suggestion # 推荐使用解构变量声明
csharp_prefer_simple_default_expression = true:suggestion # 推荐使用简化的默认值表达式
csharp_style_prefer_local_over_anonymous_function = true:suggestion # 推荐使用本地函数而非匿名函数
csharp_style_inlined_variable_declaration = true:suggestion # 推荐内联变量声明
# 首选顶层语句的偏好设置
csharp_style_prefer_top_level_statements = true:silent # 推荐使用顶层语句,不强制要求

View File

@ -3,7 +3,12 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.10.34916.146 VisualStudioVersion = 17.10.34916.146
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeRelease", "CodeRelease\CodeRelease.csproj", "{C58D2D43-B90B-4CEA-810F-99027F8F865A}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeRelease", "CodeRelease\CodeRelease.csproj", "{C58D2D43-B90B-4CEA-810F-99027F8F865A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{74FD82FD-055B-45E9-AE81-0CAFDF083ECB}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@ -2,15 +2,12 @@
using CodeRelease.Model; using CodeRelease.Model;
using CodeRelease.Utile; using CodeRelease.Utile;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Serialization; using Newtonsoft.Json.Serialization;
using System;
namespace CodeRelease.Controllers namespace CodeRelease.Controllers

View File

@ -1,8 +1,4 @@
using Newtonsoft.Json; using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace CodeRelease.Model namespace CodeRelease.Model
{ {
/// <summary> /// <summary>

View File

@ -1,8 +1,6 @@
using CodeRelease.Model; using CodeRelease.Model;
using CodeRelease.Utile; using CodeRelease.Utile;
using Microsoft.Extensions.Configuration;
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
// Add services to the container. // Add services to the container.

View File

@ -1,9 +1,5 @@
using CodeRelease.Model; using CodeRelease.Model;
using Newtonsoft.Json;
using static System.Net.Mime.MediaTypeNames;
namespace CodeRelease.Utile namespace CodeRelease.Utile
{ {
/// <summary> /// <summary>

View File

@ -1,6 +1,4 @@
using System; using System.IO.Compression;
using System.IO;
using System.IO.Compression;
namespace CodeRelease.Utile namespace CodeRelease.Utile
{ {
/// <summary> /// <summary>