prevent to display things double in console
This commit is contained in:
parent
4296649dca
commit
69f5534523
@ -65,13 +65,13 @@ namespace BlubbFish.Utils {
|
|||||||
private void DisattachToFw() {
|
private void DisattachToFw() {
|
||||||
this.stdout.WriteEvent -= this.fw.Write;
|
this.stdout.WriteEvent -= this.fw.Write;
|
||||||
this.stdout.WriteLineEvent -= this.fw.WriteLine;
|
this.stdout.WriteLineEvent -= this.fw.WriteLine;
|
||||||
this.errout.WriteEvent -= this.fw.WriteLine;
|
this.errout.WriteEvent -= this.fw.Write;
|
||||||
this.errout.WriteLineEvent -= this.fw.WriteLine;
|
this.errout.WriteLineEvent -= this.fw.WriteLine;
|
||||||
}
|
}
|
||||||
private void AttachToFw() {
|
private void AttachToFw() {
|
||||||
this.stdout.WriteEvent += this.fw.Write;
|
this.stdout.WriteEvent += this.fw.Write;
|
||||||
this.stdout.WriteLineEvent += this.fw.WriteLine;
|
this.stdout.WriteLineEvent += this.fw.WriteLine;
|
||||||
this.errout.WriteEvent += this.fw.WriteLine;
|
this.errout.WriteEvent += this.fw.Write;
|
||||||
this.errout.WriteLineEvent += this.fw.WriteLine;
|
this.errout.WriteLineEvent += this.fw.WriteLine;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -137,14 +137,13 @@ namespace BlubbFish.Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override Encoding Encoding => Encoding.UTF8;
|
public override Encoding Encoding => Encoding.UTF8;
|
||||||
public override void Write(String value) {
|
|
||||||
this.WriteEvent?.Invoke(this, new ConsoleWriterEventArgs(value, this.stream, this.streamtype));
|
public override void Write(String value) => this.WriteEvent?.Invoke(this, new ConsoleWriterEventArgs(value, this.stream, this.streamtype));
|
||||||
base.Write(value);
|
//base.Write(value);
|
||||||
}
|
|
||||||
public override void WriteLine(String value) {
|
public override void WriteLine(String value) => this.WriteLineEvent?.Invoke(this, new ConsoleWriterEventArgs(value, this.stream, this.streamtype));
|
||||||
this.WriteLineEvent?.Invoke(this, new ConsoleWriterEventArgs(value, this.stream, this.streamtype));
|
//base.WriteLine(value);
|
||||||
base.WriteLine(value);
|
|
||||||
}
|
|
||||||
public event EventHandler<ConsoleWriterEventArgs> WriteEvent;
|
public event EventHandler<ConsoleWriterEventArgs> WriteEvent;
|
||||||
public event EventHandler<ConsoleWriterEventArgs> WriteLineEvent;
|
public event EventHandler<ConsoleWriterEventArgs> WriteLineEvent;
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
using System.Reflection;
|
#if !NETCOREAPP
|
||||||
|
using System.Reflection;
|
||||||
using System.Resources;
|
using System.Resources;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||||
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||||
// die mit einer Assembly verknüpft sind.
|
// die mit einer Assembly verknüpft sind.
|
||||||
#if NETCOREAPP
|
|
||||||
#else
|
|
||||||
[assembly: AssemblyTitle("Utils")]
|
[assembly: AssemblyTitle("Utils")]
|
||||||
[assembly: AssemblyDescription("Provides useful classes for other projects")]
|
[assembly: AssemblyDescription("Provides useful classes for other projects")]
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
|
Loading…
Reference in New Issue
Block a user