Rewrite Bot-Utils so that handlers are threaded
Tiny fix in INIReader
This commit is contained in:
parent
a7c0a8906a
commit
6d412593f6
@ -79,6 +79,7 @@ namespace BlubbFish.Utils.IoT.Bots {
|
|||||||
|
|
||||||
protected void ModulEvents() {
|
protected void ModulEvents() {
|
||||||
foreach (KeyValuePair<String, AModul<T>> item in this.moduls) {
|
foreach (KeyValuePair<String, AModul<T>> item in this.moduls) {
|
||||||
|
item.Value.EventLibSetter();
|
||||||
item.Value.Update += this.ModulUpdate;
|
item.Value.Update += this.ModulUpdate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Threading;
|
||||||
using BlubbFish.Utils.IoT.Bots.Events;
|
using BlubbFish.Utils.IoT.Bots.Events;
|
||||||
|
|
||||||
namespace BlubbFish.Utils.IoT.Bots.Moduls {
|
namespace BlubbFish.Utils.IoT.Bots.Moduls {
|
||||||
@ -49,6 +50,14 @@ namespace BlubbFish.Utils.IoT.Bots.Moduls {
|
|||||||
|
|
||||||
public virtual void SetInterconnection(String param, Action<Object> hook, Object data) { }
|
public virtual void SetInterconnection(String param, Action<Object> hook, Object data) { }
|
||||||
|
|
||||||
|
public abstract void EventLibSetter();
|
||||||
|
|
||||||
|
protected abstract void LibUpadteThread(Object state);
|
||||||
|
|
||||||
|
protected void HandleLibUpdate(Object sender, EventArgs e) {
|
||||||
|
ThreadPool.QueueUserWorkItem(this.LibUpadteThread, e);
|
||||||
|
}
|
||||||
|
|
||||||
public abstract void Dispose();
|
public abstract void Dispose();
|
||||||
|
|
||||||
public void SetConfig(Dictionary<String, Dictionary<String, String>> newconf) {
|
public void SetConfig(Dictionary<String, Dictionary<String, String>> newconf) {
|
||||||
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden,
|
||||||
// indem Sie "*" wie unten gezeigt eingeben:
|
// indem Sie "*" wie unten gezeigt eingeben:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
[assembly: AssemblyVersion("1.0.1.0")]
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
[assembly: AssemblyFileVersion("1.0.1.0")]
|
||||||
|
@ -8,7 +8,7 @@ namespace BlubbFish.Utils {
|
|||||||
public class InIReader : IDisposable
|
public class InIReader : IDisposable
|
||||||
{
|
{
|
||||||
private Dictionary<String, Dictionary<String, String>> inifile;
|
private Dictionary<String, Dictionary<String, String>> inifile;
|
||||||
private FileSystemWatcher k;
|
private readonly FileSystemWatcher k;
|
||||||
private readonly String filename;
|
private readonly String filename;
|
||||||
private static List<String> search_path = new List<String>() {
|
private static List<String> search_path = new List<String>() {
|
||||||
Directory.GetCurrentDirectory()
|
Directory.GetCurrentDirectory()
|
||||||
|
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||||
// übernehmen, indem Sie "*" eingeben:
|
// übernehmen, indem Sie "*" eingeben:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.1.1")]
|
[assembly: AssemblyVersion("1.1.2")]
|
||||||
[assembly: AssemblyFileVersion("1.1.1")]
|
[assembly: AssemblyFileVersion("1.1.2")]
|
||||||
|
Loading…
Reference in New Issue
Block a user