diff --git a/EDS.Editor.EditorUpdateSite/Controllers/WeatherForecastController.cs b/EDS.Editor.EditorUpdateSite/Controllers/WeatherForecastController.cs new file mode 100644 index 0000000..2546e4e --- /dev/null +++ b/EDS.Editor.EditorUpdateSite/Controllers/WeatherForecastController.cs @@ -0,0 +1,33 @@ +using Microsoft.AspNetCore.Mvc; + +namespace EDS.Editor.EditorUpdateSite.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 _logger; + + public WeatherForecastController(ILogger logger) + { + _logger = logger; + } + + [HttpGet(Name = "GetWeatherForecast")] + public IEnumerable Get() + { + return Enumerable.Range(1, 5).Select(index => new WeatherForecast + { + Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)), + TemperatureC = Random.Shared.Next(-20, 55), + Summary = Summaries[Random.Shared.Next(Summaries.Length)] + }) + .ToArray(); + } + } +} diff --git a/EDS.Editor.EditorUpdateSite/EDS.Editor.EditorUpdateSite.csproj b/EDS.Editor.EditorUpdateSite/EDS.Editor.EditorUpdateSite.csproj new file mode 100644 index 0000000..dfd6613 --- /dev/null +++ b/EDS.Editor.EditorUpdateSite/EDS.Editor.EditorUpdateSite.csproj @@ -0,0 +1,19 @@ + + + + net8.0 + enable + enable + + + + + + + + + PreserveNewest + + + + diff --git a/EDS.Editor.EditorUpdateSite/EDS.Editor.EditorUpdateSite.http b/EDS.Editor.EditorUpdateSite/EDS.Editor.EditorUpdateSite.http new file mode 100644 index 0000000..bfacc38 --- /dev/null +++ b/EDS.Editor.EditorUpdateSite/EDS.Editor.EditorUpdateSite.http @@ -0,0 +1,6 @@ +@EDS.Editor.EditorUpdateSite_HostAddress = http://localhost:5002 + +GET {{EDS.Editor.EditorUpdateSite_HostAddress}}/weatherforecast/ +Accept: application/json + +### diff --git a/EDS.Editor.EditorUpdateSite/Program.cs b/EDS.Editor.EditorUpdateSite/Program.cs new file mode 100644 index 0000000..f9040d0 --- /dev/null +++ b/EDS.Editor.EditorUpdateSite/Program.cs @@ -0,0 +1,41 @@ + +namespace EDS.Editor.EditorUpdateSite +{ + public class Program + { + public static void Main(string[] args) + { + var builder = WebApplication.CreateBuilder(args); + + // Add services to the container. + + builder.Services.AddControllers(); + // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle + builder.Services.AddEndpointsApiExplorer(); + builder.Services.AddSwaggerGen(); + + var app = builder.Build(); + + // Configure the HTTP request pipeline. + if (app.Environment.IsDevelopment()) + { + app.UseSwagger(); + app.UseSwaggerUI(); + } + + StaticFileOptions options = new StaticFileOptions() + { + + }; + + app.UseStaticFiles(); + + app.UseAuthorization(); + + + app.MapControllers(); + + app.Run(); + } + } +} diff --git a/EDS.Editor.EditorUpdateSite/Properties/launchSettings.json b/EDS.Editor.EditorUpdateSite/Properties/launchSettings.json new file mode 100644 index 0000000..5d84b72 --- /dev/null +++ b/EDS.Editor.EditorUpdateSite/Properties/launchSettings.json @@ -0,0 +1,31 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:26433", + "sslPort": 0 + } + }, + "profiles": { + "EditorUpdateSite": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "http://localhost:5002", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/EDS.Editor.EditorUpdateSite/WeatherForecast.cs b/EDS.Editor.EditorUpdateSite/WeatherForecast.cs new file mode 100644 index 0000000..7c3b20c --- /dev/null +++ b/EDS.Editor.EditorUpdateSite/WeatherForecast.cs @@ -0,0 +1,13 @@ +namespace EDS.Editor.EditorUpdateSite +{ + public class WeatherForecast + { + public DateOnly Date { get; set; } + + public int TemperatureC { get; set; } + + public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); + + public string? Summary { get; set; } + } +} diff --git a/EDS.Editor.EditorUpdateSite/appsettings.Development.json b/EDS.Editor.EditorUpdateSite/appsettings.Development.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/EDS.Editor.EditorUpdateSite/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/EDS.Editor.EditorUpdateSite/appsettings.json b/EDS.Editor.EditorUpdateSite/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/EDS.Editor.EditorUpdateSite/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/EDS.Editor.EditorUpdateSite/tools/nssm-2.24.rar b/EDS.Editor.EditorUpdateSite/tools/nssm-2.24.rar new file mode 100644 index 0000000..ef2f5a5 Binary files /dev/null and b/EDS.Editor.EditorUpdateSite/tools/nssm-2.24.rar differ diff --git a/EDS.Editor.EditorUpdateSite/wwwroot/1.txt b/EDS.Editor.EditorUpdateSite/wwwroot/1.txt new file mode 100644 index 0000000..30d74d2 --- /dev/null +++ b/EDS.Editor.EditorUpdateSite/wwwroot/1.txt @@ -0,0 +1 @@ +test \ No newline at end of file diff --git a/EDS.Editor.EditorUpdateSite/wwwroot/Index.html b/EDS.Editor.EditorUpdateSite/wwwroot/Index.html new file mode 100644 index 0000000..fe0c4c8 --- /dev/null +++ b/EDS.Editor.EditorUpdateSite/wwwroot/Index.html @@ -0,0 +1,12 @@ + + + + + 编辑器更新站点 + + +
+ 编辑器更新站点 +
+ + \ No newline at end of file diff --git a/EDS.Editor.sln b/EDS.Editor.sln new file mode 100644 index 0000000..fc623cc --- /dev/null +++ b/EDS.Editor.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.10.34928.147 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EDS.Editor.EditorUpdateSite", "EDS.Editor.EditorUpdateSite\EDS.Editor.EditorUpdateSite.csproj", "{41E1E3C8-5880-48CF-BED8-282294BB31C9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {41E1E3C8-5880-48CF-BED8-282294BB31C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {41E1E3C8-5880-48CF-BED8-282294BB31C9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {41E1E3C8-5880-48CF-BED8-282294BB31C9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {41E1E3C8-5880-48CF-BED8-282294BB31C9}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {9A99CD8E-F3DF-4A71-B260-165046DAF667} + EndGlobalSection +EndGlobal