2 Commits
Author SHA1 Message Date
BlubbFish 65fdcdc12c add file Changelog.md 2019-12-01 17:54:32 +01:00
BlubbFish 69f5534523 prevent to display things double in console 2019-11-29 14:45:42 +01:00
5 changed files with 14 additions and 14 deletions
View File
+9 -10
View File
@@ -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;
} }
+2 -3
View File
@@ -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("")]
+1
View File
@@ -56,6 +56,7 @@
<Compile Include="Updater.cs" /> <Compile Include="Updater.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="..\CHANGELOG.md" />
<Content Include="..\CONTRIBUTING.md" /> <Content Include="..\CONTRIBUTING.md" />
<Content Include="..\LICENSE" /> <Content Include="..\LICENSE" />
<Content Include="..\README.md" /> <Content Include="..\README.md" />
+1
View File
@@ -21,6 +21,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Content Include="../CHANGELOG.md" />
<Content Include="../CONTRIBUTING.md" /> <Content Include="../CONTRIBUTING.md" />
<Content Include="../LICENSE" /> <Content Include="../LICENSE" />
<Content Include="../README.md" /> <Content Include="../README.md" />