From 1d59ac08afbd7cda492a4b3f3cd761101ae52b6f Mon Sep 17 00:00:00 2001 From: oneRain Date: Fri, 19 Mar 2021 14:19:18 +0800 Subject: [PATCH] chore: remove leanengine app --- .../Controllers/FunctionController.cs | 27 ------------ .../Controllers/PingController.cs | 27 ------------ .../Controllers/WeatherForecastController.cs | 34 -------------- .../LeanEngine/CloudFunctionAttribute.cs | 14 ------ Sample/LeanEngineApp/LeanEngine/LeanEngine.cs | 12 ----- Sample/LeanEngineApp/LeanEngineApp.csproj | 12 ----- Sample/LeanEngineApp/Program.cs | 22 ---------- Sample/LeanEngineApp/Startup.cs | 44 ------------------- Sample/LeanEngineApp/WeatherForecast.cs | 13 ------ .../appsettings.Development.json | 9 ---- Sample/LeanEngineApp/appsettings.json | 10 ----- csharp-sdk.sln | 9 ++++ 12 files changed, 9 insertions(+), 224 deletions(-) delete mode 100644 Sample/LeanEngineApp/Controllers/FunctionController.cs delete mode 100644 Sample/LeanEngineApp/Controllers/PingController.cs delete mode 100644 Sample/LeanEngineApp/Controllers/WeatherForecastController.cs delete mode 100644 Sample/LeanEngineApp/LeanEngine/CloudFunctionAttribute.cs delete mode 100644 Sample/LeanEngineApp/LeanEngine/LeanEngine.cs delete mode 100644 Sample/LeanEngineApp/LeanEngineApp.csproj delete mode 100644 Sample/LeanEngineApp/Program.cs delete mode 100644 Sample/LeanEngineApp/Startup.cs delete mode 100644 Sample/LeanEngineApp/WeatherForecast.cs delete mode 100644 Sample/LeanEngineApp/appsettings.Development.json delete mode 100644 Sample/LeanEngineApp/appsettings.json diff --git a/Sample/LeanEngineApp/Controllers/FunctionController.cs b/Sample/LeanEngineApp/Controllers/FunctionController.cs deleted file mode 100644 index f10cbc6..0000000 --- a/Sample/LeanEngineApp/Controllers/FunctionController.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; - -namespace LeanEngineApp.Controllers { - [ApiController] - [Route("{1,1.1}/functions/")] - public class FunctionController : ControllerBase { - public FunctionController() { - } - - [HttpGet("_ops/metadatas")] - public Dictionary> Get() { - List functions = new List { - - }; - return new Dictionary> { - { "result", functions } - }; - } - - public async Task Post() { - return null; - } - } -} diff --git a/Sample/LeanEngineApp/Controllers/PingController.cs b/Sample/LeanEngineApp/Controllers/PingController.cs deleted file mode 100644 index 74d9ab5..0000000 --- a/Sample/LeanEngineApp/Controllers/PingController.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Threading; -using System.Collections.Generic; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Logging; - -namespace LeanEngineApp.Controllers { - [ApiController] - [Route("__engine/{1,1.1}/ping")] - public class PingController : ControllerBase { - private readonly ILogger logger; - - public PingController(ILogger logger) { - this.logger = logger; - } - - [HttpGet] - public Dictionary Get() { - Console.WriteLine("ping get to console"); - logger.LogDebug("ping get to logger"); - return new Dictionary { - { "runtime", "dotnet" }, - { "version", "1.0.0" } - }; - } - } -} diff --git a/Sample/LeanEngineApp/Controllers/WeatherForecastController.cs b/Sample/LeanEngineApp/Controllers/WeatherForecastController.cs deleted file mode 100644 index c08cdf9..0000000 --- a/Sample/LeanEngineApp/Controllers/WeatherForecastController.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Logging; - -namespace LeanEngineApp.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] - public IEnumerable Get() { - var rng = new Random(); - return Enumerable.Range(1, 5).Select(index => new WeatherForecast { - Date = DateTime.Now.AddDays(index), - TemperatureC = rng.Next(-20, 55), - Summary = Summaries[rng.Next(Summaries.Length)] - }) - .ToArray(); - } - } -} diff --git a/Sample/LeanEngineApp/LeanEngine/CloudFunctionAttribute.cs b/Sample/LeanEngineApp/LeanEngine/CloudFunctionAttribute.cs deleted file mode 100644 index 110ca8a..0000000 --- a/Sample/LeanEngineApp/LeanEngine/CloudFunctionAttribute.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace LeanEngineApp.LeanEngine { - [AttributeUsage(AttributeTargets.Method)] - public class CloudFunctionAttribute : Attribute { - public string Name { - get; - } - - public CloudFunctionAttribute(string name) { - Name = name; - } - } -} diff --git a/Sample/LeanEngineApp/LeanEngine/LeanEngine.cs b/Sample/LeanEngineApp/LeanEngine/LeanEngine.cs deleted file mode 100644 index 9509018..0000000 --- a/Sample/LeanEngineApp/LeanEngine/LeanEngine.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace LeanEngineApp.LeanEngine { - public class LeanEngine { - private Dictionary dict; - - public LeanEngine() { - - } - } -} diff --git a/Sample/LeanEngineApp/LeanEngineApp.csproj b/Sample/LeanEngineApp/LeanEngineApp.csproj deleted file mode 100644 index b0f0402..0000000 --- a/Sample/LeanEngineApp/LeanEngineApp.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - netcoreapp3.1 - 0.6.4 - - - - - - - diff --git a/Sample/LeanEngineApp/Program.cs b/Sample/LeanEngineApp/Program.cs deleted file mode 100644 index e5fb3c9..0000000 --- a/Sample/LeanEngineApp/Program.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; - -namespace LeanEngineApp { - public class Program { - public static void Main(string[] args) { - CreateHostBuilder(args).Build().Run(); - } - - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => { - webBuilder.UseStartup(); - }); - } -} diff --git a/Sample/LeanEngineApp/Startup.cs b/Sample/LeanEngineApp/Startup.cs deleted file mode 100644 index 7726e01..0000000 --- a/Sample/LeanEngineApp/Startup.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.AspNetCore.HttpsPolicy; -using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; - -namespace LeanEngineApp { - public class Startup { - public Startup(IConfiguration configuration) { - Configuration = configuration; - } - - public IConfiguration Configuration { get; } - - // This method gets called by the runtime. Use this method to add services to the container. - public void ConfigureServices(IServiceCollection services) { - services.AddControllers(); - } - - // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { - if (env.IsDevelopment()) { - app.UseDeveloperExceptionPage(); - } - - app.UseHttpsRedirection(); - - app.UseRouting(); - - app.UseAuthorization(); - - app.UseEndpoints(endpoints => { - endpoints.MapControllers(); - }); - } - } -} diff --git a/Sample/LeanEngineApp/WeatherForecast.cs b/Sample/LeanEngineApp/WeatherForecast.cs deleted file mode 100644 index 5257525..0000000 --- a/Sample/LeanEngineApp/WeatherForecast.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -namespace LeanEngineApp { - public class WeatherForecast { - public DateTime Date { get; set; } - - public int TemperatureC { get; set; } - - public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); - - public string Summary { get; set; } - } -} diff --git a/Sample/LeanEngineApp/appsettings.Development.json b/Sample/LeanEngineApp/appsettings.Development.json deleted file mode 100644 index 8983e0f..0000000 --- a/Sample/LeanEngineApp/appsettings.Development.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - } -} diff --git a/Sample/LeanEngineApp/appsettings.json b/Sample/LeanEngineApp/appsettings.json deleted file mode 100644 index d9d9a9b..0000000 --- a/Sample/LeanEngineApp/appsettings.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information" - } - }, - "AllowedHosts": "*" -} diff --git a/csharp-sdk.sln b/csharp-sdk.sln index 8697e48..3f7d58c 100644 --- a/csharp-sdk.sln +++ b/csharp-sdk.sln @@ -37,6 +37,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiveQuery-Unity", "LiveQuer EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LiveQueryApp", "Sample\LiveQueryApp\LiveQueryApp.csproj", "{9D5E6A37-8925-48ED-B7EA-12C89291B59D}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Engine", "Engine", "{8087ABCD-629C-4EE5-9ECE-8BDAE631236F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Engine", "Engine\Engine.csproj", "{0A6AEBC9-9A36-4EA7-8F58-8B951126092D}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -95,6 +99,10 @@ Global {9D5E6A37-8925-48ED-B7EA-12C89291B59D}.Debug|Any CPU.Build.0 = Debug|Any CPU {9D5E6A37-8925-48ED-B7EA-12C89291B59D}.Release|Any CPU.ActiveCfg = Release|Any CPU {9D5E6A37-8925-48ED-B7EA-12C89291B59D}.Release|Any CPU.Build.0 = Release|Any CPU + {0A6AEBC9-9A36-4EA7-8F58-8B951126092D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0A6AEBC9-9A36-4EA7-8F58-8B951126092D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0A6AEBC9-9A36-4EA7-8F58-8B951126092D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0A6AEBC9-9A36-4EA7-8F58-8B951126092D}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {26CDAE2A-6D79-4981-8D80-3EA34FDFB134} = {319A9989-3B69-4AD0-9E43-F6D31C1D2A4A} @@ -110,6 +118,7 @@ Global {0F61B6D7-4948-4D98-B6CC-41CF33B55669} = {A1A24E0F-6901-4A9A-9BB8-4F586BC7EE17} {12482E48-C0CF-46B1-8FDD-5885D1B7DC4D} = {A1A24E0F-6901-4A9A-9BB8-4F586BC7EE17} {9D5E6A37-8925-48ED-B7EA-12C89291B59D} = {2D980281-F060-4363-AB7A-D4B6C30ADDBB} + {0A6AEBC9-9A36-4EA7-8F58-8B951126092D} = {8087ABCD-629C-4EE5-9ECE-8BDAE631236F} EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution version = 0.6.4