summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--DSACore/Controllers/CommandsController.cs49
-rw-r--r--DSACore/Controllers/ValuesController.cs45
-rw-r--r--DSACore/DSACore.csproj15
-rw-r--r--DSACore/Models/Command.cs13
-rw-r--r--DSACore/Program.cs24
-rw-r--r--DSACore/Properties/launchSettings.json30
-rw-r--r--DSACore/Startup.cs47
-rw-r--r--DSACore/appsettings.Development.json9
-rw-r--r--DSACore/appsettings.json8
-rw-r--r--DiscoBot.sln6
-rw-r--r--DiscoBot/session.json54
11 files changed, 300 insertions, 0 deletions
diff --git a/DSACore/Controllers/CommandsController.cs b/DSACore/Controllers/CommandsController.cs
new file mode 100644
index 0000000..bda8fd0
--- /dev/null
+++ b/DSACore/Controllers/CommandsController.cs
@@ -0,0 +1,49 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using DSACore.Models;
+using Microsoft.AspNetCore.Mvc;
+
+// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
+
+namespace DSACore.Controllers
+{
+ [Route("api/[controller]")]
+ public class CommandsController : Controller
+ {
+ // GET: api/<controller>
+ [HttpGet]
+ public IEnumerable<string> Get()
+ {
+ return new string[] { "value1", "value2" };
+ }
+
+ // GET api/<controller>/5
+ [HttpGet("{id}")]
+ public string Get(int id)
+ {
+ return "value";
+ }
+
+ // POST api/<controller>/Felis
+ [HttpPost]
+ public string Post([FromBody]Command cmd)
+ {
+ return cmd.Name + " strichelt erfolgreich das Einhorn" + cmd.CmdText;
+ }
+
+
+ // PUT api/<controller>/5
+ [HttpPut("{id}")]
+ public void Put(int id, [FromBody]string value)
+ {
+ }
+
+ // DELETE api/<controller>/5
+ [HttpDelete("{id}")]
+ public void Delete(int id)
+ {
+ }
+ }
+}
diff --git a/DSACore/Controllers/ValuesController.cs b/DSACore/Controllers/ValuesController.cs
new file mode 100644
index 0000000..eb08898
--- /dev/null
+++ b/DSACore/Controllers/ValuesController.cs
@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+
+namespace DSACore.Controllers
+{
+ [Route("api/[controller]")]
+ [ApiController]
+ public class ValuesController : ControllerBase
+ {
+ // GET api/values
+ [HttpGet]
+ public ActionResult<IEnumerable<string>> Get()
+ {
+ return new string[] { "value1", "value2" };
+ }
+
+ // GET api/values/5
+ [HttpGet("{id}")]
+ public ActionResult<string> Get(int id)
+ {
+ return "value";
+ }
+
+ // POST api/values
+ [HttpPost]
+ public void Post([FromBody] string value)
+ {
+ }
+
+ // PUT api/values/5
+ [HttpPut("{id}")]
+ public void Put(int id, [FromBody] string value)
+ {
+ }
+
+ // DELETE api/values/5
+ [HttpDelete("{id}")]
+ public void Delete(int id)
+ {
+ }
+ }
+}
diff --git a/DSACore/DSACore.csproj b/DSACore/DSACore.csproj
new file mode 100644
index 0000000..1661770
--- /dev/null
+++ b/DSACore/DSACore.csproj
@@ -0,0 +1,15 @@
+<Project Sdk="Microsoft.NET.Sdk.Web">
+
+ <PropertyGroup>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PackageReference Include="Microsoft.AspNetCore.App" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <Folder Include="wwwroot\" />
+ </ItemGroup>
+
+</Project>
diff --git a/DSACore/Models/Command.cs b/DSACore/Models/Command.cs
new file mode 100644
index 0000000..75e3bee
--- /dev/null
+++ b/DSACore/Models/Command.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace DSACore.Models
+{
+ public class Command
+ {
+ public string Name { get; set; }
+ public string CmdText { get; set; }
+ }
+}
diff --git a/DSACore/Program.cs b/DSACore/Program.cs
new file mode 100644
index 0000000..373a39e
--- /dev/null
+++ b/DSACore/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 DSACore
+{
+ public class Program
+ {
+ public static void Main(string[] args)
+ {
+ CreateWebHostBuilder(args).Build().Run();
+ }
+
+ public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
+ WebHost.CreateDefaultBuilder(args)
+ .UseStartup<Startup>();
+ }
+}
diff --git a/DSACore/Properties/launchSettings.json b/DSACore/Properties/launchSettings.json
new file mode 100644
index 0000000..889d022
--- /dev/null
+++ b/DSACore/Properties/launchSettings.json
@@ -0,0 +1,30 @@
+{
+ "$schema": "http://json.schemastore.org/launchsettings.json",
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:29492",
+ "sslPort": 44365
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "launchUrl": "api/commands",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "DSACore": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "launchUrl": "api/commands",
+ "applicationUrl": "https://localhost:5001;http://localhost:5000",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/DSACore/Startup.cs b/DSACore/Startup.cs
new file mode 100644
index 0000000..2d0c2a3
--- /dev/null
+++ b/DSACore/Startup.cs
@@ -0,0 +1,47 @@
+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.Logging;
+using Microsoft.Extensions.Options;
+
+namespace DSACore
+{
+ 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.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
+ }
+
+ // 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();
+ }
+ else
+ {
+ app.UseHsts();
+ }
+
+ app.UseHttpsRedirection();
+ app.UseMvc();
+ }
+ }
+}
diff --git a/DSACore/appsettings.Development.json b/DSACore/appsettings.Development.json
new file mode 100644
index 0000000..e203e94
--- /dev/null
+++ b/DSACore/appsettings.Development.json
@@ -0,0 +1,9 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Debug",
+ "System": "Information",
+ "Microsoft": "Information"
+ }
+ }
+}
diff --git a/DSACore/appsettings.json b/DSACore/appsettings.json
new file mode 100644
index 0000000..def9159
--- /dev/null
+++ b/DSACore/appsettings.json
@@ -0,0 +1,8 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Warning"
+ }
+ },
+ "AllowedHosts": "*"
+}
diff --git a/DiscoBot.sln b/DiscoBot.sln
index da708ed..c2a9e96 100644
--- a/DiscoBot.sln
+++ b/DiscoBot.sln
@@ -11,6 +11,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZooBOTanica", "ZooBOTanica\
EndProject
Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "NodeJSServer", "NodeJSServer\NodeJSServer.njsproj", "{57064377-C08C-4218-9C55-0552D40F3877}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DSACore", "DSACore\DSACore.csproj", "{89343249-016C-47C0-AED6-C99165DE8B66}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -33,6 +35,10 @@ Global
{57064377-C08C-4218-9C55-0552D40F3877}.Debug|Any CPU.Build.0 = Debug|Any CPU
{57064377-C08C-4218-9C55-0552D40F3877}.Release|Any CPU.ActiveCfg = Release|Any CPU
{57064377-C08C-4218-9C55-0552D40F3877}.Release|Any CPU.Build.0 = Release|Any CPU
+ {89343249-016C-47C0-AED6-C99165DE8B66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {89343249-016C-47C0-AED6-C99165DE8B66}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {89343249-016C-47C0-AED6-C99165DE8B66}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {89343249-016C-47C0-AED6-C99165DE8B66}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/DiscoBot/session.json b/DiscoBot/session.json
index d0c651d..03c46f3 100644
--- a/DiscoBot/session.json
+++ b/DiscoBot/session.json
@@ -6,15 +6,69 @@
"Name": "Felis Exodus Schattenwald",
"Lebenspunkte_Aktuell": 30,
"Ausdauer_Aktuell": 0,
+ "Astralpunkte_Aktuell": 20
+ },
+ {
+ "Name": "Gardist",
+ "Lebenspunkte_Aktuell": 29,
+ "Ausdauer_Aktuell": 0,
+ "Astralpunkte_Aktuell": 0
+ },
+ {
+ "Name": "Hartmut Reiher",
+ "Lebenspunkte_Aktuell": 31,
+ "Ausdauer_Aktuell": 0,
+ "Astralpunkte_Aktuell": 0
+ },
+ {
+ "Name": "Helga vom Drachenei, Tausendsasserin",
+ "Lebenspunkte_Aktuell": 21,
+ "Ausdauer_Aktuell": 0,
+ "Astralpunkte_Aktuell": 35
+ },
+ {
+ "Name": "Krenko",
+ "Lebenspunkte_Aktuell": 25,
+ "Ausdauer_Aktuell": 0,
+ "Astralpunkte_Aktuell": 0
+ },
+ {
+ "Name": "Ledur Torfinson",
+ "Lebenspunkte_Aktuell": 39,
+ "Ausdauer_Aktuell": 0,
"Astralpunkte_Aktuell": 0
},
{
+ "Name": "Morla",
+ "Lebenspunkte_Aktuell": 26,
+ "Ausdauer_Aktuell": 0,
+ "Astralpunkte_Aktuell": 13
+ },
+ {
"Name": "Numeri Illuminus",
"Lebenspunkte_Aktuell": 28,
"Ausdauer_Aktuell": 0,
"Astralpunkte_Aktuell": 40
},
{
+ "Name": "Potus",
+ "Lebenspunkte_Aktuell": 39,
+ "Ausdauer_Aktuell": 0,
+ "Astralpunkte_Aktuell": 16
+ },
+ {
+ "Name": "Pump aus der Gosse",
+ "Lebenspunkte_Aktuell": 18,
+ "Ausdauer_Aktuell": 0,
+ "Astralpunkte_Aktuell": 13
+ },
+ {
+ "Name": "Rhoktar4",
+ "Lebenspunkte_Aktuell": 34,
+ "Ausdauer_Aktuell": 0,
+ "Astralpunkte_Aktuell": 17
+ },
+ {
"Name": "Volant",
"Lebenspunkte_Aktuell": 28,
"Ausdauer_Aktuell": 0,