diff --git a/Study.DelegateSeries.MarkdownDoc/Program.cs b/Study.DelegateSeries.MarkdownDoc/Program.cs new file mode 100644 index 0000000..017c8e3 --- /dev/null +++ b/Study.DelegateSeries.MarkdownDoc/Program.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; + +namespace Study.DelegateSeries.MarkdownDoc +{ + public class Program + { + public static void Main(string[] args) + { + CreateWebHostBuilder(args).Build().Run(); + } + + public static IWebHostBuilder CreateWebHostBuilder(string[] args) => + WebHost.CreateDefaultBuilder(args) + .UseStartup(); + } +} diff --git a/Study.DelegateSeries.MarkdownDoc/Properties/launchSettings.json b/Study.DelegateSeries.MarkdownDoc/Properties/launchSettings.json new file mode 100644 index 0000000..3e53cba --- /dev/null +++ b/Study.DelegateSeries.MarkdownDoc/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:8431", + "sslPort": 44371 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "Study.DelegateSeries.MarkdownDoc": { + "commandName": "Project", + "launchBrowser": true, + "applicationUrl": "https://localhost:5001;http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} \ No newline at end of file diff --git a/Study.DelegateSeries.MarkdownDoc/Startup.cs b/Study.DelegateSeries.MarkdownDoc/Startup.cs new file mode 100644 index 0000000..8199894 --- /dev/null +++ b/Study.DelegateSeries.MarkdownDoc/Startup.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.DependencyInjection; + +namespace Study.DelegateSeries.MarkdownDoc +{ + public class Startup + { + /// + /// 此方法被运行时调用 + /// 使用此方法添加服务到服务容器中 + /// 详细信息,请移步 https://go.microsoft.com/fwlink/?LinkID=398940 + /// + public void ConfigureServices(IServiceCollection services) + { + } + + /// + /// 此方法被运行时调用 + /// 使用此方法配置Http请求管道 + /// + public void Configure(IApplicationBuilder app, IHostingEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + + //配置:只使用静态文件服务 + + app.UseDefaultFiles(); + + app.UseStaticFiles(); + } + } +} diff --git a/Study.DelegateSeries.MarkdownDoc/Study.DelegateSeries.MarkdownDoc.csproj b/Study.DelegateSeries.MarkdownDoc/Study.DelegateSeries.MarkdownDoc.csproj new file mode 100644 index 0000000..b17e944 --- /dev/null +++ b/Study.DelegateSeries.MarkdownDoc/Study.DelegateSeries.MarkdownDoc.csproj @@ -0,0 +1,17 @@ + + + + netcoreapp2.2 + InProcess + + + + + + + + + + + + diff --git a/Study.DelegateSeries.MarkdownDoc/Web.Debug.config b/Study.DelegateSeries.MarkdownDoc/Web.Debug.config deleted file mode 100644 index 755e745..0000000 --- a/Study.DelegateSeries.MarkdownDoc/Web.Debug.config +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/Study.DelegateSeries.MarkdownDoc/Web.config b/Study.DelegateSeries.MarkdownDoc/Web.config deleted file mode 100644 index 6288f61..0000000 --- a/Study.DelegateSeries.MarkdownDoc/Web.config +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - diff --git a/Study.DelegateSeries.MarkdownDoc/appsettings.Development.json b/Study.DelegateSeries.MarkdownDoc/appsettings.Development.json new file mode 100644 index 0000000..e203e94 --- /dev/null +++ b/Study.DelegateSeries.MarkdownDoc/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Debug", + "System": "Information", + "Microsoft": "Information" + } + } +} diff --git a/Study.DelegateSeries.MarkdownDoc/appsettings.json b/Study.DelegateSeries.MarkdownDoc/appsettings.json new file mode 100644 index 0000000..def9159 --- /dev/null +++ b/Study.DelegateSeries.MarkdownDoc/appsettings.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/Study.DelegateSeries.MarkdownDoc/wwwroot/Index.html b/Study.DelegateSeries.MarkdownDoc/wwwroot/Index.html new file mode 100644 index 0000000..66ea90a --- /dev/null +++ b/Study.DelegateSeries.MarkdownDoc/wwwroot/Index.html @@ -0,0 +1,10 @@ + + + + + + + + index.html + + \ No newline at end of file diff --git a/Study.DelegateSeries.MarkdownDoc/委托学习.md b/Study.DelegateSeries.MarkdownDoc/wwwroot/委托学习.md similarity index 100% rename from Study.DelegateSeries.MarkdownDoc/委托学习.md rename to Study.DelegateSeries.MarkdownDoc/wwwroot/委托学习.md diff --git a/WebApplication1/Program.cs b/WebApplication1/Program.cs new file mode 100644 index 0000000..8b7d1da --- /dev/null +++ b/WebApplication1/Program.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; + +namespace WebApplication1 +{ + public class Program + { + public static void Main(string[] args) + { + CreateWebHostBuilder(args).Build().Run(); + } + + public static IWebHostBuilder CreateWebHostBuilder(string[] args) => + WebHost.CreateDefaultBuilder(args) + .UseStartup(); + } +} diff --git a/WebApplication1/Properties/launchSettings.json b/WebApplication1/Properties/launchSettings.json new file mode 100644 index 0000000..08ac69e --- /dev/null +++ b/WebApplication1/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:8008", + "sslPort": 0 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "WebApplication1": { + "commandName": "Project", + "launchBrowser": true, + "applicationUrl": "http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} \ No newline at end of file diff --git a/WebApplication1/Startup.cs b/WebApplication1/Startup.cs new file mode 100644 index 0000000..aa2877b --- /dev/null +++ b/WebApplication1/Startup.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.DependencyInjection; + +namespace WebApplication1 +{ + public class Startup + { + // This method gets called by the runtime. Use this method to add services to the container. + // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 + public void ConfigureServices(IServiceCollection services) + { + + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IHostingEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + + + + //默认中间件 + app.Run(async (context) => + { + await context.Response.WriteAsync("Hello World!"); + }); + } + } +} diff --git a/WebApplication1/WebApplication1.csproj b/WebApplication1/WebApplication1.csproj new file mode 100644 index 0000000..ffe2b91 --- /dev/null +++ b/WebApplication1/WebApplication1.csproj @@ -0,0 +1,16 @@ + + + + netcoreapp2.1 + + + + + + + + + + + + diff --git a/委托学习.md b/委托学习.md deleted file mode 100644 index 80c74f3..0000000 --- a/委托学习.md +++ /dev/null @@ -1,2 +0,0 @@ -# ίϵѧϰ ------- diff --git a/委托系列学习.sln b/委托系列学习.sln index b12d0e6..803fa4f 100644 --- a/委托系列学习.sln +++ b/委托系列学习.sln @@ -9,26 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Src", "Src", "{0CDDA35F-F04 EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Study.DelegateSeries.Core", "Study.DelegateSeries.Core\Study.DelegateSeries.Core.csproj", "{6801B518-6303-4CB6-95BB-0B3A81DA2617}" EndProject -Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Study.DelegateSeries.MarkdownDoc", "Study.DelegateSeries.MarkdownDoc\", "{E777A0B5-F7A2-4314-A296-026B0454D4AA}" - ProjectSection(WebsiteProperties) = preProject - TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0" - Debug.AspNetCompiler.VirtualPath = "/localhost_3569" - Debug.AspNetCompiler.PhysicalPath = "Study.DelegateSeries.MarkdownDoc\" - Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_3569\" - Debug.AspNetCompiler.Updateable = "true" - Debug.AspNetCompiler.ForceOverwrite = "true" - Debug.AspNetCompiler.FixedNames = "false" - Debug.AspNetCompiler.Debug = "True" - Release.AspNetCompiler.VirtualPath = "/localhost_3569" - Release.AspNetCompiler.PhysicalPath = "Study.DelegateSeries.MarkdownDoc\" - Release.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_3569\" - Release.AspNetCompiler.Updateable = "true" - Release.AspNetCompiler.ForceOverwrite = "true" - Release.AspNetCompiler.FixedNames = "false" - Release.AspNetCompiler.Debug = "False" - VWDPort = "3569" - DefaultWebSiteLanguage = "Visual C#" - EndProjectSection +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Study.DelegateSeries.MarkdownDoc", "Study.DelegateSeries.MarkdownDoc\Study.DelegateSeries.MarkdownDoc.csproj", "{F31847FB-C413-44A5-BCF0-1D7399CE4A7C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -40,17 +21,17 @@ Global {6801B518-6303-4CB6-95BB-0B3A81DA2617}.Debug|Any CPU.Build.0 = Debug|Any CPU {6801B518-6303-4CB6-95BB-0B3A81DA2617}.Release|Any CPU.ActiveCfg = Release|Any CPU {6801B518-6303-4CB6-95BB-0B3A81DA2617}.Release|Any CPU.Build.0 = Release|Any CPU - {E777A0B5-F7A2-4314-A296-026B0454D4AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E777A0B5-F7A2-4314-A296-026B0454D4AA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E777A0B5-F7A2-4314-A296-026B0454D4AA}.Release|Any CPU.ActiveCfg = Debug|Any CPU - {E777A0B5-F7A2-4314-A296-026B0454D4AA}.Release|Any CPU.Build.0 = Debug|Any CPU + {F31847FB-C413-44A5-BCF0-1D7399CE4A7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F31847FB-C413-44A5-BCF0-1D7399CE4A7C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F31847FB-C413-44A5-BCF0-1D7399CE4A7C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F31847FB-C413-44A5-BCF0-1D7399CE4A7C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {6801B518-6303-4CB6-95BB-0B3A81DA2617} = {0CDDA35F-F045-4BE9-8C0F-D1A9C1BE433C} - {E777A0B5-F7A2-4314-A296-026B0454D4AA} = {D8C26D31-979E-4492-A3CD-C325BCD13097} + {F31847FB-C413-44A5-BCF0-1D7399CE4A7C} = {D8C26D31-979E-4492-A3CD-C325BCD13097} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {0C61CBE2-3F09-492A-993F-549076A3F16B}