From 03a3be20626f2c020fbe2c3702aca67c5f75c5dc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E5=9B=BD=E4=BC=9F?= <366193849@qq.com>
Date: Wed, 3 Nov 2021 16:40:30 +0800
Subject: [PATCH] =?UTF-8?q?UI=E4=BD=BF=E7=94=A8NET.SDK?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ApplicationBuilderExtensions.cs | 5 +-
FastGithub.UI/FastGithub.UI.csproj | 164 +++---------------
FastGithub.UI/Properties/AssemblyInfo.cs | 55 ------
.../Properties/Resources.Designer.cs | 63 -------
FastGithub.UI/Properties/Resources.resx | 117 -------------
FastGithub.UI/Properties/Settings.Designer.cs | 26 ---
FastGithub.UI/Properties/Settings.settings | 7 -
FastGithub.UI/packages.config | 6 -
publish.cmd | 1 +
9 files changed, 28 insertions(+), 416 deletions(-)
delete mode 100644 FastGithub.UI/Properties/AssemblyInfo.cs
delete mode 100644 FastGithub.UI/Properties/Resources.Designer.cs
delete mode 100644 FastGithub.UI/Properties/Resources.resx
delete mode 100644 FastGithub.UI/Properties/Settings.Designer.cs
delete mode 100644 FastGithub.UI/Properties/Settings.settings
delete mode 100644 FastGithub.UI/packages.config
diff --git a/FastGithub.HttpServer/ApplicationBuilderExtensions.cs b/FastGithub.HttpServer/ApplicationBuilderExtensions.cs
index 7bdc75c..fdcb4f4 100644
--- a/FastGithub.HttpServer/ApplicationBuilderExtensions.cs
+++ b/FastGithub.HttpServer/ApplicationBuilderExtensions.cs
@@ -19,8 +19,11 @@ namespace FastGithub
{
return app.Use(next => async context =>
{
+ if (context.Response.HasStarted == false)
+ {
+ context.Response.Headers.Server = serverHeader;
+ }
await next(context);
- context.Response.Headers.Server = serverHeader;
});
}
diff --git a/FastGithub.UI/FastGithub.UI.csproj b/FastGithub.UI/FastGithub.UI.csproj
index b502b61..8fac8f3 100644
--- a/FastGithub.UI/FastGithub.UI.csproj
+++ b/FastGithub.UI/FastGithub.UI.csproj
@@ -1,150 +1,32 @@
-
-
-
+
+
- Debug
- AnyCPU
- {5082061F-38D5-4F50-945E-791C85B9BDB5}
WinExe
- FastGithub.UI
- FastGithub.UI
- v4.5
- 512
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 4
- true
- true
-
-
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
- false
-
-
+ net45
+ true
+ true
+ MIT
app.manifest
-
-
app.ico
+ False
+
+
+
+
+
+
-
- ..\packages\LiveCharts.0.9.7\lib\net45\LiveCharts.dll
- True
-
-
- ..\packages\LiveCharts.Wpf.0.9.7\lib\net45\LiveCharts.Wpf.dll
- True
-
-
- ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll
- True
-
-
-
-
-
-
-
-
-
-
-
- 4.0
-
-
-
-
+
-
- MSBuild:Compile
- Designer
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- Designer
- MSBuild:Compile
-
-
- MSBuild:Compile
- Designer
-
-
- App.xaml
- Code
-
-
-
- FlowChart.xaml
-
-
- UdpLogListBox.xaml
-
-
- MainWindow.xaml
- Code
-
-
-
-
- Code
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+ all
+
+
+ all
+
+
+
+
diff --git a/FastGithub.UI/Properties/AssemblyInfo.cs b/FastGithub.UI/Properties/AssemblyInfo.cs
deleted file mode 100644
index 0cc5504..0000000
--- a/FastGithub.UI/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Windows;
-
-// 有关程序集的一般信息由以下
-// 控制。更改这些特性值可修改
-// 与程序集关联的信息。
-[assembly: AssemblyTitle("FastGithub.UI")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("FastGithub.UI")]
-[assembly: AssemblyCopyright("Copyright © 2021")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// 将 ComVisible 设置为 false 会使此程序集中的类型
-//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
-//请将此类型的 ComVisible 特性设置为 true。
-[assembly: ComVisible(false)]
-
-//若要开始生成可本地化的应用程序,请设置
-//.csproj 文件中的 CultureYouAreCodingWith
-//例如,如果您在源文件中使用的是美国英语,
-//使用的是美国英语,请将 设置为 en-US。 然后取消
-//对以下 NeutralResourceLanguage 特性的注释。 更新
-//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
-
-//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
-
-
-[assembly: ThemeInfo(
- ResourceDictionaryLocation.None, //主题特定资源词典所处位置
- //(未在页面中找到资源时使用,
- //或应用程序资源字典中找到时使用)
- ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
- //(未在页面中找到资源时使用,
- //、应用程序或任何主题专用资源字典中找到时使用)
-)]
-
-
-// 程序集的版本信息由下列四个值组成:
-//
-// 主版本
-// 次版本
-// 生成号
-// 修订号
-//
-//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
-//通过使用 "*",如下所示:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/FastGithub.UI/Properties/Resources.Designer.cs b/FastGithub.UI/Properties/Resources.Designer.cs
deleted file mode 100644
index 96f9f61..0000000
--- a/FastGithub.UI/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// 此代码由工具生成。
-// 运行时版本:4.0.30319.42000
-//
-// 对此文件的更改可能会导致不正确的行为,并且如果
-// 重新生成代码,这些更改将会丢失。
-//
-//------------------------------------------------------------------------------
-
-namespace FastGithub.UI.Properties {
- using System;
-
-
- ///
- /// 一个强类型的资源类,用于查找本地化的字符串等。
- ///
- // 此类是由 StronglyTypedResourceBuilder
- // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
- // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
- // (以 /str 作为命令选项),或重新生成 VS 项目。
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources() {
- }
-
- ///
- /// 返回此类使用的缓存的 ResourceManager 实例。
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager {
- get {
- if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FastGithub.UI.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// 重写当前线程的 CurrentUICulture 属性,对
- /// 使用此强类型资源类的所有资源查找执行重写。
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/FastGithub.UI/Properties/Resources.resx b/FastGithub.UI/Properties/Resources.resx
deleted file mode 100644
index af7dbeb..0000000
--- a/FastGithub.UI/Properties/Resources.resx
+++ /dev/null
@@ -1,117 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/FastGithub.UI/Properties/Settings.Designer.cs b/FastGithub.UI/Properties/Settings.Designer.cs
deleted file mode 100644
index e4e4809..0000000
--- a/FastGithub.UI/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// 此代码由工具生成。
-// 运行时版本:4.0.30319.42000
-//
-// 对此文件的更改可能会导致不正确的行为,并且如果
-// 重新生成代码,这些更改将会丢失。
-//
-//------------------------------------------------------------------------------
-
-namespace FastGithub.UI.Properties {
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default {
- get {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/FastGithub.UI/Properties/Settings.settings b/FastGithub.UI/Properties/Settings.settings
deleted file mode 100644
index 033d7a5..0000000
--- a/FastGithub.UI/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/FastGithub.UI/packages.config b/FastGithub.UI/packages.config
deleted file mode 100644
index 1efbdad..0000000
--- a/FastGithub.UI/packages.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/publish.cmd b/publish.cmd
index 9ce72f5..4a4e8f3 100644
--- a/publish.cmd
+++ b/publish.cmd
@@ -1,6 +1,7 @@
cd ./FastGithub
set output=./bin/publish
if exist "%output%" rd /S /Q "%output%"
+dotnet publish -c Release -o "%output%/fastgithub_win-x64" ../FastGithub.UI/FastGithub.UI.csproj
dotnet publish -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true --self-contained -r win-x64 -o "%output%/fastgithub_win-x64"
dotnet publish -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true --self-contained -r linux-x64 -o "%output%/fastgithub_linux-x64"
dotnet publish -c Release /p:PublishSingleFile=true /p:PublishTrimmed=true --self-contained -r osx-x64 -o "%output%/fastgithub_osx-x64"
\ No newline at end of file