chore: remove leanengine app

oneRain 2021-03-19 14:19:18 +08:00
parent eb15c32e40
commit 1d59ac08af
12 changed files with 9 additions and 224 deletions

View File

@ -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<string, List<string>> Get() {
List<string> functions = new List<string> {
};
return new Dictionary<string, List<string>> {
{ "result", functions }
};
}
public async Task<object> Post() {
return null;
}
}
}

View File

@ -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<PingController> logger;
public PingController(ILogger<PingController> logger) {
this.logger = logger;
}
[HttpGet]
public Dictionary<string, string> Get() {
Console.WriteLine("ping get to console");
logger.LogDebug("ping get to logger");
return new Dictionary<string, string> {
{ "runtime", "dotnet" },
{ "version", "1.0.0" }
};
}
}
}

View File

@ -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<WeatherForecastController> _logger;
public WeatherForecastController(ILogger<WeatherForecastController> logger) {
_logger = logger;
}
[HttpGet]
public IEnumerable<WeatherForecast> 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();
}
}
}

View File

@ -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;
}
}
}

View File

@ -1,12 +0,0 @@
using System;
using System.Collections.Generic;
namespace LeanEngineApp.LeanEngine {
public class LeanEngine {
private Dictionary<string, object> dict;
public LeanEngine() {
}
}
}

View File

@ -1,12 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<ReleaseVersion>0.6.4</ReleaseVersion>
</PropertyGroup>
<ItemGroup>
<Folder Include="LeanEngine\" />
</ItemGroup>
</Project>

View File

@ -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<Startup>();
});
}
}

View File

@ -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();
});
}
}
}

View File

@ -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; }
}
}

View File

@ -1,9 +0,0 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}

View File

@ -1,10 +0,0 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
}

View File

@ -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