Compare commits
8
Commits
v1.2.1
..
1a33d2ef0a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1a33d2ef0a | ||
|
|
3e79b425a5 | ||
|
|
9326ab8659 | ||
|
|
ec93004c2b | ||
|
|
a13e03a808 | ||
|
|
8fecb22620 | ||
|
|
d7f22d62b0 | ||
|
|
1cc64de12b |
@@ -1,9 +1,12 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.Runtime.Loader;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
namespace BlubbFish.Utils.IoT.Bots {
|
namespace BlubbFish.Utils.IoT.Bots {
|
||||||
public abstract class ABot {
|
public abstract class ABot {
|
||||||
|
#if !NETCOREAPP
|
||||||
private Thread sig_thread;
|
private Thread sig_thread;
|
||||||
|
#endif
|
||||||
private Boolean RunningProcess = true;
|
private Boolean RunningProcess = true;
|
||||||
|
|
||||||
protected ProgramLogger logger = new ProgramLogger();
|
protected ProgramLogger logger = new ProgramLogger();
|
||||||
@@ -14,8 +17,18 @@ namespace BlubbFish.Utils.IoT.Bots {
|
|||||||
this.RunningProcess = false;
|
this.RunningProcess = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if NETCOREAPP
|
||||||
|
private void Default_Unloading(AssemblyLoadContext obj) {
|
||||||
|
Console.WriteLine("BlubbFish.Utils.IoT.Bots.Bot.SetupShutdown: Signalhandler Windows NETCORE recieved.");
|
||||||
|
this.RunningProcess = false;
|
||||||
|
Console.WriteLine("BlubbFish.Utils.IoT.Bots.Bot.WaitForShutdown: Shutdown.");
|
||||||
|
this.Dispose();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
protected void WaitForShutdown() {
|
protected void WaitForShutdown() {
|
||||||
if(Type.GetType("Mono.Runtime") != null) {
|
if(Type.GetType("Mono.Runtime") != null) {
|
||||||
|
#if !NETCOREAPP
|
||||||
this.sig_thread = new Thread(delegate () {
|
this.sig_thread = new Thread(delegate () {
|
||||||
Mono.Unix.UnixSignal[] signals = new Mono.Unix.UnixSignal[] {
|
Mono.Unix.UnixSignal[] signals = new Mono.Unix.UnixSignal[] {
|
||||||
new Mono.Unix.UnixSignal(Mono.Unix.Native.Signum.SIGTERM),
|
new Mono.Unix.UnixSignal(Mono.Unix.Native.Signum.SIGTERM),
|
||||||
@@ -30,19 +43,29 @@ namespace BlubbFish.Utils.IoT.Bots {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.sig_thread.Start();
|
this.sig_thread.Start();
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
|
#if NETCOREAPP
|
||||||
|
AssemblyLoadContext.Default.Unloading += this.Default_Unloading;
|
||||||
|
Console.WriteLine("BlubbFish.Utils.IoT.Bots.Bot.WaitForShutdown: Signalhandler Netcore attached.");
|
||||||
|
#endif
|
||||||
Console.CancelKeyPress += new ConsoleCancelEventHandler(this.SetupShutdown);
|
Console.CancelKeyPress += new ConsoleCancelEventHandler(this.SetupShutdown);
|
||||||
Console.WriteLine("BlubbFish.Utils.IoT.Bots.Bot.WaitForShutdown: Signalhandler Windows attached.");
|
Console.WriteLine("BlubbFish.Utils.IoT.Bots.Bot.WaitForShutdown: Signalhandler Windows attached.");
|
||||||
}
|
}
|
||||||
while(this.RunningProcess) {
|
while(this.RunningProcess) {
|
||||||
Thread.Sleep(100);
|
Thread.Sleep(100);
|
||||||
}
|
}
|
||||||
|
Console.WriteLine("BlubbFish.Utils.IoT.Bots.Bot.WaitForShutdown: Shutdown.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public virtual void Dispose() {
|
public virtual void Dispose() {
|
||||||
|
#if !NETCOREAPP
|
||||||
if(this.sig_thread != null && this.sig_thread.IsAlive) {
|
if(this.sig_thread != null && this.sig_thread.IsAlive) {
|
||||||
this.sig_thread.Abort();
|
this.sig_thread.Abort();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,6 +64,12 @@
|
|||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Webserver.cs" />
|
<Compile Include="Webserver.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="..\CHANGELOG.md" />
|
||||||
|
<Content Include="..\CONTRIBUTING.md" />
|
||||||
|
<Content Include="..\LICENSE" />
|
||||||
|
<Content Include="..\README.md" />
|
||||||
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\..\Librarys\litjson\litjson\litjson_4.7.1.csproj">
|
<ProjectReference Include="..\..\..\Librarys\litjson\litjson\litjson_4.7.1.csproj">
|
||||||
<Project>{91a14cd2-2940-4500-8193-56d37edddbaa}</Project>
|
<Project>{91a14cd2-2940-4500-8193-56d37edddbaa}</Project>
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netcoreapp3.0</TargetFramework>
|
||||||
|
<RootNamespace>BlubbFish.Utils.IoT.Bots</RootNamespace>
|
||||||
|
<AssemblyName>Bot-Utils</AssemblyName>
|
||||||
|
<PackageId>Bots.IoT.Utils.BlubbFish</PackageId>
|
||||||
|
<Version>1.2.1</Version>
|
||||||
|
<AssemblyVersion>1.2.1</AssemblyVersion>
|
||||||
|
<FileVersion>1.2.1</FileVersion>
|
||||||
|
<NeutralLanguage>de-DE</NeutralLanguage>
|
||||||
|
<Description>Bot-Utils are helpers for programming a bot</Description>
|
||||||
|
<Authors>BlubbFish</Authors>
|
||||||
|
<Company>BlubbFish</Company>
|
||||||
|
<Copyright>Copyright © BlubbFish 2018 - 30.08.2019</Copyright>
|
||||||
|
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
||||||
|
<PackageProjectUrl>http://git.blubbfish.net/vs_utils/Bot-Utils</PackageProjectUrl>
|
||||||
|
<RepositoryUrl>http://git.blubbfish.net/vs_utils/Bot-Utils.git</RepositoryUrl>
|
||||||
|
<RepositoryType>git</RepositoryType>
|
||||||
|
<PackageReleaseNotes>1.2.1 When using Dispose, kill also mqtt connection and other tiny fixes
|
||||||
|
1.2.0 Refactor Bot to ABot and refere MultiSourceBot, Webserver and Bot to it. Add MultiSourceBot. Rewrite Mqtt module so that it not need to watch the connection.
|
||||||
|
1.1.9 Modify Output of SendFileResponse
|
||||||
|
1.1.8 Add logger to Webserver Class
|
||||||
|
1.1.7 Restrucutre loading, so that all is init and after the listener is started, REQUEST_URL_HOST gives now host and port
|
||||||
|
1.1.6 rename functions and make SendFileResponse with a parameter for the folder (default resources), also put returntype boolean, add function that parse post params, if path is a dictionary try to load index.html
|
||||||
|
1.1.5 add a function to send an object as json directly
|
||||||
|
1.1.4 add Woff as Binary type
|
||||||
|
1.1.3 Variables parsing now as a String
|
||||||
|
1.1.2 Fixing bug for Contenttype
|
||||||
|
1.1.1 Update to local librarys
|
||||||
|
1.1.0 Remove Helper from Bot-Utils</PackageReleaseNotes>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\..\Librarys\litjson\litjson\litjson_Core.csproj" />
|
||||||
|
<ProjectReference Include="..\..\Utils-IoT\Utils-IoT\Utils-IoT_Core.csproj" />
|
||||||
|
<ProjectReference Include="..\..\Utils\Utils\Utils_Core.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="../CHANGELOG.md" />
|
||||||
|
<Content Include="../CONTRIBUTING.md" />
|
||||||
|
<Content Include="../LICENSE" />
|
||||||
|
<Content Include="../README.md" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="..\LICENSE">
|
||||||
|
<Pack>True</Pack>
|
||||||
|
<PackagePath></PackagePath>
|
||||||
|
</None>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -14,8 +14,6 @@ namespace BlubbFish.Utils.IoT.Bots.Events {
|
|||||||
public String Property { get; protected set; }
|
public String Property { get; protected set; }
|
||||||
public String Value { get; protected set; }
|
public String Value { get; protected set; }
|
||||||
public String Source { get; protected set; }
|
public String Source { get; protected set; }
|
||||||
public override String ToString() {
|
public override String ToString() => this.Source + ": " + this.Address + " set " + this.Property + " to " + this.Value;
|
||||||
return this.Source + ": " + this.Address + " set " + this.Property + " to " + this.Value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ namespace BlubbFish.Utils.IoT.Bots.Events {
|
|||||||
this.Value = text;
|
this.Value = text;
|
||||||
this.Source = "MQTT";
|
this.Source = "MQTT";
|
||||||
}
|
}
|
||||||
public override String ToString() {
|
public override String ToString() => this.Source + ": on " + this.Address + " set " + this.Value;
|
||||||
return this.Source + ": on " + this.Address + " set " + this.Value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,6 @@ namespace BlubbFish.Utils.IoT.Bots.Events {
|
|||||||
this.Value = text;
|
this.Value = text;
|
||||||
this.Source = "Senml";
|
this.Source = "Senml";
|
||||||
}
|
}
|
||||||
public override String ToString() {
|
public override String ToString() => this.Source + ": on " + this.Address + " set " + this.Value;
|
||||||
return this.Source + ": on " + this.Address + " set " + this.Value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ namespace BlubbFish.Utils.IoT.Bots.Events {
|
|||||||
this.Source = "POLLING";
|
this.Source = "POLLING";
|
||||||
}
|
}
|
||||||
|
|
||||||
public override String ToString() {
|
public override String ToString() => this.Source + ": " + this.Value + " on " + this.Address;
|
||||||
return this.Source + ": " + this.Value + " on " + this.Address;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ namespace BlubbFish.Utils.IoT.Bots.Moduls {
|
|||||||
if (this.HasConfig && this.ConfigPublic) {
|
if (this.HasConfig && this.ConfigPublic) {
|
||||||
Dictionary<String, Dictionary<String, String>> ret = new Dictionary<String, Dictionary<String, String>>(this.config);
|
Dictionary<String, Dictionary<String, String>> ret = new Dictionary<String, Dictionary<String, String>>(this.config);
|
||||||
if (ret.ContainsKey("modul")) {
|
if (ret.ContainsKey("modul")) {
|
||||||
ret.Remove("modul");
|
_ = ret.Remove("modul");
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -61,7 +61,7 @@ namespace BlubbFish.Utils.IoT.Bots.Moduls {
|
|||||||
public void SetConfig(Dictionary<String, Dictionary<String, String>> newconf) {
|
public void SetConfig(Dictionary<String, Dictionary<String, String>> newconf) {
|
||||||
if (this.HasConfig && this.ConfigPublic) {
|
if (this.HasConfig && this.ConfigPublic) {
|
||||||
if (newconf.ContainsKey("modul")) {
|
if (newconf.ContainsKey("modul")) {
|
||||||
newconf.Remove("modul");
|
_ = newconf.Remove("modul");
|
||||||
}
|
}
|
||||||
if (this.config.ContainsKey("modul")) {
|
if (this.config.ContainsKey("modul")) {
|
||||||
newconf.Add("modul", this.config["modul"]);
|
newconf.Add("modul", this.config["modul"]);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace BlubbFish.Utils.IoT.Bots.Moduls {
|
|||||||
|
|
||||||
#region Cronjobrunner
|
#region Cronjobrunner
|
||||||
protected void Runner() {
|
protected void Runner() {
|
||||||
Thread.Sleep(DateTime.Now.AddMinutes(1).AddSeconds(DateTime.Now.Second * (-1)).AddMilliseconds(DateTime.Now.Millisecond * (-1)) - DateTime.Now);
|
Thread.Sleep(DateTime.Now.AddMinutes(1).AddSeconds(DateTime.Now.Second * -1).AddMilliseconds(DateTime.Now.Millisecond * -1) - DateTime.Now);
|
||||||
while (true) {
|
while (true) {
|
||||||
if (this.crontime.Minute != DateTime.Now.Minute) {
|
if (this.crontime.Minute != DateTime.Now.Minute) {
|
||||||
this.crontime = DateTime.Now;
|
this.crontime = DateTime.Now;
|
||||||
@@ -140,9 +140,7 @@ namespace BlubbFish.Utils.IoT.Bots.Moduls {
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region AModul
|
#region AModul
|
||||||
public override void SetInterconnection(String cron, Action<Object> hook, Object data) {
|
public override void SetInterconnection(String cron, Action<Object> hook, Object data) => this.internalCron.Add(new Tuple<String, Action<Object>, Object>(cron, hook, data));
|
||||||
this.internalCron.Add(new Tuple<String, Action<Object>, Object>(cron, hook, data));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void UpdateConfig() { }
|
protected override void UpdateConfig() { }
|
||||||
#endregion
|
#endregion
|
||||||
@@ -164,7 +162,7 @@ namespace BlubbFish.Utils.IoT.Bots.Moduls {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override void Dispose() {
|
public override void Dispose() {
|
||||||
Dispose(true);
|
this.Dispose(true);
|
||||||
GC.SuppressFinalize(this);
|
GC.SuppressFinalize(this);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -6,9 +6,7 @@ namespace BlubbFish.Utils.IoT.Bots.Moduls {
|
|||||||
protected readonly Dictionary<String, Dictionary<String, String>> events = new Dictionary<String, Dictionary<String, String>>();
|
protected readonly Dictionary<String, Dictionary<String, String>> events = new Dictionary<String, Dictionary<String, String>>();
|
||||||
|
|
||||||
#region Constructor
|
#region Constructor
|
||||||
public Overtaker(T lib, InIReader settings) : base(lib, settings) {
|
public Overtaker(T lib, InIReader settings) : base(lib, settings) => this.ParseIni();
|
||||||
this.ParseIni();
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Overtakerfunctions
|
#region Overtakerfunctions
|
||||||
@@ -63,9 +61,7 @@ namespace BlubbFish.Utils.IoT.Bots.Moduls {
|
|||||||
|
|
||||||
#region AModul
|
#region AModul
|
||||||
public override void Interconnect(Dictionary<String, AModul<T>> moduls) { }
|
public override void Interconnect(Dictionary<String, AModul<T>> moduls) { }
|
||||||
protected override void UpdateConfig() {
|
protected override void UpdateConfig() => this.ParseIni();
|
||||||
this.ParseIni();
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IDisposable Support
|
#region IDisposable Support
|
||||||
@@ -80,7 +76,7 @@ namespace BlubbFish.Utils.IoT.Bots.Moduls {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override void Dispose() {
|
public override void Dispose() {
|
||||||
Dispose(true);
|
this.Dispose(true);
|
||||||
GC.SuppressFinalize(this);
|
GC.SuppressFinalize(this);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ namespace BlubbFish.Utils.IoT.Bots.Moduls {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override void Dispose() {
|
public override void Dispose() {
|
||||||
Dispose(true);
|
this.Dispose(true);
|
||||||
GC.SuppressFinalize(this);
|
GC.SuppressFinalize(this);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Reflection;
|
#if !NETCOREAPP
|
||||||
|
using System.Reflection;
|
||||||
using System.Resources;
|
using System.Resources;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
@@ -10,7 +11,7 @@ using System.Runtime.InteropServices;
|
|||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("BlubbFish")]
|
[assembly: AssemblyCompany("BlubbFish")]
|
||||||
[assembly: AssemblyProduct("Bot-Utils")]
|
[assembly: AssemblyProduct("Bot-Utils")]
|
||||||
[assembly: AssemblyCopyright("Copyright © 2018 - 30.08.2019")]
|
[assembly: AssemblyCopyright("Copyright © BlubbFish 2018 - 30.08.2019")]
|
||||||
[assembly: AssemblyTrademark("© BlubbFish")]
|
[assembly: AssemblyTrademark("© BlubbFish")]
|
||||||
[assembly: AssemblyCulture("")]
|
[assembly: AssemblyCulture("")]
|
||||||
[assembly: NeutralResourcesLanguage("de-DE")]
|
[assembly: NeutralResourcesLanguage("de-DE")]
|
||||||
@@ -35,7 +36,7 @@ using System.Runtime.InteropServices;
|
|||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.1")]
|
[assembly: AssemblyVersion("1.2.1")]
|
||||||
[assembly: AssemblyFileVersion("1.2.1")]
|
[assembly: AssemblyFileVersion("1.2.1")]
|
||||||
|
#endif
|
||||||
/*
|
/*
|
||||||
* 1.1.0 Remove Helper from Bot-Utils
|
* 1.1.0 Remove Helper from Bot-Utils
|
||||||
* 1.1.1 Update to local librarys
|
* 1.1.1 Update to local librarys
|
||||||
|
|||||||
+11
-9
@@ -32,10 +32,10 @@ namespace BlubbFish.Utils.IoT.Bots {
|
|||||||
Console.WriteLine("Webserver is Running...");
|
Console.WriteLine("Webserver is Running...");
|
||||||
try {
|
try {
|
||||||
while(this.httplistener.IsListening) {
|
while(this.httplistener.IsListening) {
|
||||||
ThreadPool.QueueUserWorkItem((state) => {
|
_ = ThreadPool.QueueUserWorkItem((state) => {
|
||||||
HttpListenerContext httplistenercontext = state as HttpListenerContext;
|
HttpListenerContext httplistenercontext = state as HttpListenerContext;
|
||||||
try {
|
try {
|
||||||
this.SendWebserverResponse(httplistenercontext);
|
_ = this.SendWebserverResponse(httplistenercontext);
|
||||||
} catch { } finally {
|
} catch { } finally {
|
||||||
httplistenercontext.Response.OutputStream.Close();
|
httplistenercontext.Response.OutputStream.Close();
|
||||||
}
|
}
|
||||||
@@ -48,18 +48,14 @@ namespace BlubbFish.Utils.IoT.Bots {
|
|||||||
public static Boolean SendFileResponse(HttpListenerContext cont, String folder = "resources", Boolean printOutput = true) {
|
public static Boolean SendFileResponse(HttpListenerContext cont, String folder = "resources", Boolean printOutput = true) {
|
||||||
String restr = cont.Request.Url.PathAndQuery;
|
String restr = cont.Request.Url.PathAndQuery;
|
||||||
if(restr.StartsWith("/")) {
|
if(restr.StartsWith("/")) {
|
||||||
if(restr.IndexOf("?") != -1) {
|
restr = restr.IndexOf("?") != -1 ? restr[1..restr.IndexOf("?")] : restr.Substring(1);
|
||||||
restr = restr.Substring(1, restr.IndexOf("?") - 1);
|
|
||||||
} else {
|
|
||||||
restr = restr.Substring(1);
|
|
||||||
}
|
|
||||||
if(Directory.Exists(folder + "/" + restr)) {
|
if(Directory.Exists(folder + "/" + restr)) {
|
||||||
restr += "/index.html";
|
restr += "/index.html";
|
||||||
}
|
}
|
||||||
String end = restr.IndexOf('.') != -1 ? restr.Substring(restr.IndexOf('.') + 1) : "";
|
String end = restr.IndexOf('.') != -1 ? restr.Substring(restr.IndexOf('.') + 1) : "";
|
||||||
if(File.Exists(folder + "/" + restr)) {
|
if(File.Exists(folder + "/" + restr)) {
|
||||||
try {
|
try {
|
||||||
if(end == "png" || end == "jpg" || end == "jpeg" || end == "ico" || end == "woff") {
|
if(end == "png" || end == "jpg" || end == "jpeg" || end == "ico" || end == "woff" || end == "mp4") {
|
||||||
Byte[] output = File.ReadAllBytes(folder + "/" + restr);
|
Byte[] output = File.ReadAllBytes(folder + "/" + restr);
|
||||||
switch(end) {
|
switch(end) {
|
||||||
case "ico":
|
case "ico":
|
||||||
@@ -68,6 +64,9 @@ namespace BlubbFish.Utils.IoT.Bots {
|
|||||||
case "woff":
|
case "woff":
|
||||||
cont.Response.ContentType = "font/woff";
|
cont.Response.ContentType = "font/woff";
|
||||||
break;
|
break;
|
||||||
|
case "mp4":
|
||||||
|
cont.Response.ContentType = "video/mpeg";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
cont.Response.OutputStream.Write(output, 0, output.Length);
|
cont.Response.OutputStream.Write(output, 0, output.Length);
|
||||||
if(printOutput) {
|
if(printOutput) {
|
||||||
@@ -145,7 +144,10 @@ namespace BlubbFish.Utils.IoT.Bots {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override void Dispose() {
|
public override void Dispose() {
|
||||||
this.httplistener.Stop();
|
if(this.httplistener.IsListening) {
|
||||||
|
this.httplistener.Stop();
|
||||||
|
}
|
||||||
|
|
||||||
this.httplistener.Close();
|
this.httplistener.Close();
|
||||||
if(this.databackend != null) {
|
if(this.databackend != null) {
|
||||||
this.databackend.Dispose();
|
this.databackend.Dispose();
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 16
|
||||||
|
VisualStudioVersion = 16.0.29519.87
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bot-Utils_Core", "Bot-Utils\Bot-Utils_Core.csproj", "{CB48457C-C567-42BC-9E5B-DAE5A3383108}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Utils-IoT_Core", "..\Utils-IoT\Utils-IoT\Utils-IoT_Core.csproj", "{86E9D6ED-EE31-4FE7-AEA6-555DBBAA69A4}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Utils_Core", "..\Utils\Utils\Utils_Core.csproj", "{110EB1ED-1567-4A7E-B8B5-E46F421E0684}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "litjson_Core", "..\..\Librarys\litjson\litjson\litjson_Core.csproj", "{A6EB1FF2-A3F1-4C97-8E7F-0F2CE4A8A820}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{CB48457C-C567-42BC-9E5B-DAE5A3383108}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{CB48457C-C567-42BC-9E5B-DAE5A3383108}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{CB48457C-C567-42BC-9E5B-DAE5A3383108}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{CB48457C-C567-42BC-9E5B-DAE5A3383108}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{86E9D6ED-EE31-4FE7-AEA6-555DBBAA69A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{86E9D6ED-EE31-4FE7-AEA6-555DBBAA69A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{86E9D6ED-EE31-4FE7-AEA6-555DBBAA69A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{86E9D6ED-EE31-4FE7-AEA6-555DBBAA69A4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{110EB1ED-1567-4A7E-B8B5-E46F421E0684}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{110EB1ED-1567-4A7E-B8B5-E46F421E0684}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{110EB1ED-1567-4A7E-B8B5-E46F421E0684}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{110EB1ED-1567-4A7E-B8B5-E46F421E0684}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{A6EB1FF2-A3F1-4C97-8E7F-0F2CE4A8A820}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{A6EB1FF2-A3F1-4C97-8E7F-0F2CE4A8A820}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{A6EB1FF2-A3F1-4C97-8E7F-0F2CE4A8A820}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{A6EB1FF2-A3F1-4C97-8E7F-0F2CE4A8A820}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {0F0DF907-D03F-41A9-B0A2-CA229CC259EE}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
Reference in New Issue
Block a user