General code refactor.

This commit is contained in:
2021-08-17 21:23:23 +01:00
parent dc0e013d8d
commit 394c96ed82
3 changed files with 620 additions and 611 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -54,10 +54,10 @@
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System"/>
</ItemGroup>
<ItemGroup>
<Compile Include="AaruConsole.cs" />
<Compile Include="AaruConsole.cs"/>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="..\LICENSE.LGPL">
@@ -71,32 +71,32 @@
<MonoDevelop>
<Properties>
<Policies>
<StandardHeader IncludeInNewFiles="True" Text="/***************************************************************************&#xA;Aaru Data Preservation Suite&#xA;----------------------------------------------------------------------------&#xA; &#xA;Filename : ${FileName}&#xA;Author(s) : ${AuthorName} &lt;${AuthorEmail}&gt;&#xA;&#xA;Component : Component&#xA; &#xA;--[ Description ] ----------------------------------------------------------&#xA; &#xA; Description&#xA; &#xA;--[ License ] --------------------------------------------------------------&#xA; &#xA; This library is free software; you can redistribute it and/or modify&#xA; it under the terms of the GNU Lesser General Public License as&#xA; published by the Free Software Foundation; either version 2.1 of the&#xA; License, or (at your option) any later version.&#xA;&#xA; This library is distributed in the hope that it will be useful, but&#xA; WITHOUT ANY WARRANTY; without even the implied warranty of&#xA; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU&#xA; Lesser General Public License for more details.&#xA;&#xA; You should have received a copy of the GNU Lesser General Public&#xA; License along with this library; if not, see &lt;http://www.gnu.org/licenses/&gt;.&#xA;&#xA;----------------------------------------------------------------------------&#xA;Copyright © 2011-${Year} ${CopyrightHolder}&#xA;****************************************************************************/" />
<TextStylePolicy FileWidth="120" TabWidth="4" IndentWidth="4" RemoveTrailingWhitespace="True" NoTabsAfterNonTabs="False" EolMarker="Native" TabsToSpaces="True" scope="text/x-csharp" />
<CSharpFormattingPolicy IndentBlock="True" IndentBraces="False" IndentSwitchSection="True" IndentSwitchCaseSection="True" LabelPositioning="OneLess" NewLinesForBracesInTypes="True" NewLinesForBracesInMethods="True" NewLinesForBracesInProperties="True" NewLinesForBracesInAccessors="True" NewLinesForBracesInAnonymousMethods="True" NewLinesForBracesInControlBlocks="True" NewLinesForBracesInAnonymousTypes="True" NewLinesForBracesInObjectCollectionArrayInitializers="True" NewLinesForBracesInLambdaExpressionBody="True" NewLineForElse="True" NewLineForCatch="True" NewLineForFinally="True" NewLineForMembersInObjectInit="True" NewLineForMembersInAnonymousTypes="True" NewLineForClausesInQuery="True" SpacingAfterMethodDeclarationName="False" SpaceWithinMethodDeclarationParenthesis="False" SpaceBetweenEmptyMethodDeclarationParentheses="False" SpaceAfterMethodCallName="False" SpaceWithinMethodCallParentheses="False" SpaceBetweenEmptyMethodCallParentheses="False" SpaceWithinExpressionParentheses="False" SpaceWithinCastParentheses="False" SpaceWithinOtherParentheses="False" SpaceAfterCast="False" SpacesIgnoreAroundVariableDeclaration="False" SpaceBeforeOpenSquareBracket="False" SpaceBetweenEmptySquareBrackets="False" SpaceWithinSquareBrackets="False" SpaceAfterColonInBaseTypeDeclaration="True" SpaceAfterComma="True" SpaceAfterDot="False" SpaceAfterSemicolonsInForStatement="True" SpaceBeforeColonInBaseTypeDeclaration="True" SpaceBeforeComma="False" SpaceBeforeDot="False" SpaceBeforeSemicolonsInForStatement="False" SpacingAroundBinaryOperator="Single" WrappingPreserveSingleLine="True" WrappingKeepStatementsOnSingleLine="True" PlaceSystemDirectiveFirst="True" SpaceAfterControlFlowStatementKeyword="False" scope="text/x-csharp" />
<StandardHeader IncludeInNewFiles="True" Text="/***************************************************************************&#xA;Aaru Data Preservation Suite&#xA;----------------------------------------------------------------------------&#xA; &#xA;Filename : ${FileName}&#xA;Author(s) : ${AuthorName} &lt;${AuthorEmail}&gt;&#xA;&#xA;Component : Component&#xA; &#xA;--[ Description ] ----------------------------------------------------------&#xA; &#xA; Description&#xA; &#xA;--[ License ] --------------------------------------------------------------&#xA; &#xA; This library is free software; you can redistribute it and/or modify&#xA; it under the terms of the GNU Lesser General Public License as&#xA; published by the Free Software Foundation; either version 2.1 of the&#xA; License, or (at your option) any later version.&#xA;&#xA; This library is distributed in the hope that it will be useful, but&#xA; WITHOUT ANY WARRANTY; without even the implied warranty of&#xA; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU&#xA; Lesser General Public License for more details.&#xA;&#xA; You should have received a copy of the GNU Lesser General Public&#xA; License along with this library; if not, see &lt;http://www.gnu.org/licenses/&gt;.&#xA;&#xA;----------------------------------------------------------------------------&#xA;Copyright © 2011-${Year} ${CopyrightHolder}&#xA;****************************************************************************/"/>
<TextStylePolicy FileWidth="120" TabWidth="4" IndentWidth="4" RemoveTrailingWhitespace="True" NoTabsAfterNonTabs="False" EolMarker="Native" TabsToSpaces="True" scope="text/x-csharp"/>
<CSharpFormattingPolicy IndentBlock="True" IndentBraces="False" IndentSwitchSection="True" IndentSwitchCaseSection="True" LabelPositioning="OneLess" NewLinesForBracesInTypes="True" NewLinesForBracesInMethods="True" NewLinesForBracesInProperties="True" NewLinesForBracesInAccessors="True" NewLinesForBracesInAnonymousMethods="True" NewLinesForBracesInControlBlocks="True" NewLinesForBracesInAnonymousTypes="True" NewLinesForBracesInObjectCollectionArrayInitializers="True" NewLinesForBracesInLambdaExpressionBody="True" NewLineForElse="True" NewLineForCatch="True" NewLineForFinally="True" NewLineForMembersInObjectInit="True" NewLineForMembersInAnonymousTypes="True" NewLineForClausesInQuery="True" SpacingAfterMethodDeclarationName="False" SpaceWithinMethodDeclarationParenthesis="False" SpaceBetweenEmptyMethodDeclarationParentheses="False" SpaceAfterMethodCallName="False" SpaceWithinMethodCallParentheses="False" SpaceBetweenEmptyMethodCallParentheses="False" SpaceWithinExpressionParentheses="False" SpaceWithinCastParentheses="False" SpaceWithinOtherParentheses="False" SpaceAfterCast="False" SpacesIgnoreAroundVariableDeclaration="False" SpaceBeforeOpenSquareBracket="False" SpaceBetweenEmptySquareBrackets="False" SpaceWithinSquareBrackets="False" SpaceAfterColonInBaseTypeDeclaration="True" SpaceAfterComma="True" SpaceAfterDot="False" SpaceAfterSemicolonsInForStatement="True" SpaceBeforeColonInBaseTypeDeclaration="True" SpaceBeforeComma="False" SpaceBeforeDot="False" SpaceBeforeSemicolonsInForStatement="False" SpacingAroundBinaryOperator="Single" WrappingPreserveSingleLine="True" WrappingKeepStatementsOnSingleLine="True" PlaceSystemDirectiveFirst="True" SpaceAfterControlFlowStatementKeyword="False" scope="text/x-csharp"/>
</Policies>
</Properties>
</MonoDevelop>
</ProjectExtensions>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4')) and '$(OS)' == 'Unix'">
<!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
<!-- have to teach MSBuild where the Mono copy of the reference asssemblies is -->
<!-- Look in the standard install locations -->
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>
<!-- If we found Mono reference assemblies, then use them -->
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net40'">$(BaseFrameworkPathOverrideForMono)/4.0-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>
<!-- Add the Facades directory. Not sure how else to do this. Necessary at least for .NET 4.5 -->
<AssemblySearchPaths Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4')) and '$(OS)' == 'Unix'">
<!-- When compiling .NET SDK 2.0 projects targeting .NET 4.x on Mono using 'dotnet build' you -->
<!-- have to teach MSBuild where the Mono copy of the reference asssemblies is -->
<!-- Look in the standard install locations -->
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/Library/Frameworks/Mono.framework/Versions/Current/lib/mono')">/Library/Frameworks/Mono.framework/Versions/Current/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/lib/mono')">/usr/lib/mono</BaseFrameworkPathOverrideForMono>
<BaseFrameworkPathOverrideForMono Condition="'$(BaseFrameworkPathOverrideForMono)' == '' AND EXISTS('/usr/local/lib/mono')">/usr/local/lib/mono</BaseFrameworkPathOverrideForMono>
<!-- If we found Mono reference assemblies, then use them -->
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net40'">$(BaseFrameworkPathOverrideForMono)/4.0-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net45'">$(BaseFrameworkPathOverrideForMono)/4.5-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net451'">$(BaseFrameworkPathOverrideForMono)/4.5.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net452'">$(BaseFrameworkPathOverrideForMono)/4.5.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net46'">$(BaseFrameworkPathOverrideForMono)/4.6-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net461'">$(BaseFrameworkPathOverrideForMono)/4.6.1-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net462'">$(BaseFrameworkPathOverrideForMono)/4.6.2-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net47'">$(BaseFrameworkPathOverrideForMono)/4.7-api</FrameworkPathOverride>
<FrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != '' AND '$(TargetFramework)' == 'net471'">$(BaseFrameworkPathOverrideForMono)/4.7.1-api</FrameworkPathOverride>
<EnableFrameworkPathOverride Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">true</EnableFrameworkPathOverride>
<!-- Add the Facades directory. Not sure how else to do this. Necessary at least for .NET 4.5 -->
<AssemblySearchPaths Condition="'$(BaseFrameworkPathOverrideForMono)' != ''">$(FrameworkPathOverride)/Facades;$(AssemblySearchPaths)</AssemblySearchPaths>
</PropertyGroup>
</Project>

View File

@@ -33,67 +33,76 @@
namespace Aaru.Console
{
/// <summary>
/// Writes the text representation of the specified array of objects, followed by the current line terminator, to the standard output console using the specified format information.
/// Writes the text representation of the specified array of objects, followed by the current line terminator, to
/// the standard output console using the specified format information.
/// </summary>
/// <param name="format">A composite format string.</param>
/// <param name="arg">An array of objects to write using <paramref name="format"/>.</param>
/// <param name="arg">An array of objects to write using <paramref name="format" />.</param>
public delegate void WriteLineHandler(string format, params object[] arg);
/// <summary>
/// Writes the text representation of the specified array of objects, followed by the current line terminator, to the error output console using the specified format information.
/// Writes the text representation of the specified array of objects, followed by the current line terminator, to
/// the error output console using the specified format information.
/// </summary>
/// <param name="format">A composite format string.</param>
/// <param name="arg">An array of objects to write using <paramref name="format"/>.</param>
/// <param name="arg">An array of objects to write using <paramref name="format" />.</param>
public delegate void ErrorWriteLineHandler(string format, params object[] arg);
/// <summary>
/// Writes the text representation of the specified array of objects, followed by the current line terminator, to the verbose output console using the specified format information.
/// Writes the text representation of the specified array of objects, followed by the current line terminator, to
/// the verbose output console using the specified format information.
/// </summary>
/// <param name="format">A composite format string.</param>
/// <param name="arg">An array of objects to write using <paramref name="format"/>.</param>
/// <param name="arg">An array of objects to write using <paramref name="format" />.</param>
public delegate void VerboseWriteLineHandler(string format, params object[] arg);
/// <summary>
/// Writes the text representation of the specified array of objects, followed by the current line terminator, to the debug output console using the specified format information.
/// Writes the text representation of the specified array of objects, followed by the current line terminator, to
/// the debug output console using the specified format information.
/// </summary>
/// <param name="format">A composite format string.</param>
/// <param name="arg">An array of objects to write using <paramref name="format"/>.</param>
/// <param name="arg">An array of objects to write using <paramref name="format" />.</param>
public delegate void DebugWriteLineHandler(string format, params object[] arg);
/// <summary>
/// Writes the text representation of the specified array of objects, to the standard output console using the specified format information.
/// Writes the text representation of the specified array of objects, to the standard output console using the
/// specified format information.
/// </summary>
/// <param name="format">A composite format string.</param>
/// <param name="arg">An array of objects to write using <paramref name="format"/>.</param>
/// <param name="arg">An array of objects to write using <paramref name="format" />.</param>
public delegate void WriteHandler(string format, params object[] arg);
/// <summary>
/// Writes the text representation of the specified array of objects, to the error output console using the specified format information.
/// Writes the text representation of the specified array of objects, to the error output console using the
/// specified format information.
/// </summary>
/// <param name="format">A composite format string.</param>
/// <param name="arg">An array of objects to write using <paramref name="format"/>.</param>
/// <param name="arg">An array of objects to write using <paramref name="format" />.</param>
public delegate void ErrorWriteHandler(string format, params object[] arg);
/// <summary>
/// Writes the text representation of the specified array of objects, to the verbose output console using the specified format information.
/// Writes the text representation of the specified array of objects, to the verbose output console using the
/// specified format information.
/// </summary>
/// <param name="format">A composite format string.</param>
/// <param name="arg">An array of objects to write using <paramref name="format"/>.</param>
/// <param name="arg">An array of objects to write using <paramref name="format" />.</param>
public delegate void VerboseWriteHandler(string format, params object[] arg);
/// <summary>
/// Writes the text representation of the specified array of objects, to the debug output console using the specified format information.
/// Writes the text representation of the specified array of objects, to the debug output console using the
/// specified format information.
/// </summary>
/// <param name="format">A composite format string.</param>
/// <param name="arg">An array of objects to write using <paramref name="format"/>.</param>
/// <param name="arg">An array of objects to write using <paramref name="format" />.</param>
public delegate void DebugWriteHandler(string format, params object[] arg);
/// <summary>
/// Writes the text representation of the specified array of objects, followed by the current line terminator, to the debug output console using the specified format information.
/// Writes the text representation of the specified array of objects, followed by the current line terminator, to
/// the debug output console using the specified format information.
/// </summary>
/// <param name="module">Description of the module writing to the debug console</param>
/// <param name="format">A composite format string.</param>
/// <param name="arg">An array of objects to write using <paramref name="format"/>.</param>
/// <param name="arg">An array of objects to write using <paramref name="format" />.</param>
public delegate void DebugWithModuleWriteLineHandler(string module, string format, params object[] arg);
/// <summary>
@@ -103,53 +112,57 @@ namespace Aaru.Console
public static class AaruConsole
{
/// <summary>Event to receive writings to the standard output console that should be followed by a line termination.</summary>
public static event WriteLineHandler WriteLineEvent;
public static event WriteLineHandler WriteLineEvent;
/// <summary>Event to receive writings to the error output console that should be followed by a line termination.</summary>
public static event ErrorWriteLineHandler ErrorWriteLineEvent;
public static event ErrorWriteLineHandler ErrorWriteLineEvent;
/// <summary>Event to receive writings to the verbose output console that should be followed by a line termination.</summary>
public static event VerboseWriteLineHandler VerboseWriteLineEvent;
public static event VerboseWriteLineHandler VerboseWriteLineEvent;
/// <summary>Event to receive line terminations to the debug output console.</summary>
public static event DebugWriteLineHandler DebugWriteLineEvent;
public static event DebugWriteLineHandler DebugWriteLineEvent;
/// <summary>Event to receive writings to the debug output console that should be followed by a line termination.</summary>
public static event DebugWithModuleWriteLineHandler DebugWithModuleWriteLineEvent;
/// <summary>Event to receive writings to the standard output console.</summary>
public static event WriteHandler WriteEvent;
public static event WriteHandler WriteEvent;
/// <summary>Event to receive writings to the error output console.</summary>
public static event ErrorWriteHandler ErrorWriteEvent;
public static event ErrorWriteHandler ErrorWriteEvent;
/// <summary>Event to receive writings to the verbose output console.</summary>
public static event VerboseWriteHandler VerboseWriteEvent;
/// <summary>Event to receive writings to the debug output console.</summary>
public static event DebugWriteHandler DebugWriteEvent;
public static event DebugWriteHandler DebugWriteEvent;
/// <summary>
/// Writes the text representation of the specified array of objects, followed by the current line terminator, to the standard output console using the specified format information.
/// Writes the text representation of the specified array of objects, followed by the current line terminator, to
/// the standard output console using the specified format information.
/// </summary>
/// <param name="format">A composite format string.</param>
/// <param name="arg">An array of objects to write using <paramref name="format"/>.</param>
/// <param name="arg">An array of objects to write using <paramref name="format" />.</param>
public static void WriteLine(string format, params object[] arg) => WriteLineEvent?.Invoke(format, arg);
/// <summary>
/// Writes the text representation of the specified array of objects, followed by the current line terminator, to the error output console using the specified format information.
/// Writes the text representation of the specified array of objects, followed by the current line terminator, to
/// the error output console using the specified format information.
/// </summary>
/// <param name="format">A composite format string.</param>
/// <param name="arg">An array of objects to write using <paramref name="format"/>.</param>
/// <param name="arg">An array of objects to write using <paramref name="format" />.</param>
public static void ErrorWriteLine(string format, params object[] arg) =>
ErrorWriteLineEvent?.Invoke(format, arg);
/// <summary>
/// Writes the text representation of the specified array of objects, followed by the current line terminator, to the verbose output console using the specified format information.
/// Writes the text representation of the specified array of objects, followed by the current line terminator, to
/// the verbose output console using the specified format information.
/// </summary>
/// <param name="format">A composite format string.</param>
/// <param name="arg">An array of objects to write using <paramref name="format"/>.</param>
/// <param name="arg">An array of objects to write using <paramref name="format" />.</param>
public static void VerboseWriteLine(string format, params object[] arg) =>
VerboseWriteLineEvent?.Invoke(format, arg);
/// <summary>
/// Writes the text representation of the specified array of objects, followed by the current line terminator, to the debug output console using the specified format information.
/// Writes the text representation of the specified array of objects, followed by the current line terminator, to
/// the debug output console using the specified format information.
/// </summary>
/// <param name="module">Description of the module writing to the debug console</param>
/// <param name="format">A composite format string.</param>
/// <param name="arg">An array of objects to write using <paramref name="format"/>.</param>
/// <param name="arg">An array of objects to write using <paramref name="format" />.</param>
public static void DebugWriteLine(string module, string format, params object[] arg)
{
DebugWriteLineEvent?.Invoke("DEBUG (" + module + "): " + format, arg);
@@ -169,56 +182,52 @@ namespace Aaru.Console
public static void DebugWriteLine() => DebugWriteLineEvent?.Invoke("", null);
/// <summary>
/// Writes the text representation of the specified array of objects to the standard output console using the specified format information.
/// Writes the text representation of the specified array of objects to the standard output console using the
/// specified format information.
/// </summary>
/// <param name="format">A composite format string.</param>
/// <param name="arg">An array of objects to write using <paramref name="format"/>.</param>
/// <param name="arg">An array of objects to write using <paramref name="format" />.</param>
public static void Write(string format, params object[] arg) => WriteEvent?.Invoke(format, arg);
/// <summary>
/// Writes the text representation of the specified array of objects to the error output console using the specified format information.
/// Writes the text representation of the specified array of objects to the error output console using the
/// specified format information.
/// </summary>
/// <param name="format">A composite format string.</param>
/// <param name="arg">An array of objects to write using <paramref name="format"/>.</param>
/// <param name="arg">An array of objects to write using <paramref name="format" />.</param>
public static void ErrorWrite(string format, params object[] arg) => ErrorWriteEvent?.Invoke(format, arg);
/// <summary>
/// Writes the text representation of the specified array of objects to the verbose output console using the specified format information.
/// Writes the text representation of the specified array of objects to the verbose output console using the
/// specified format information.
/// </summary>
/// <param name="format">A composite format string.</param>
/// <param name="arg">An array of objects to write using <paramref name="format"/>.</param>
/// <param name="arg">An array of objects to write using <paramref name="format" />.</param>
public static void VerboseWrite(string format, params object[] arg) => VerboseWriteEvent?.Invoke(format, arg);
/// <summary>
/// Writes the text representation of the specified array of objects to the debug output console using the specified format information.
/// Writes the text representation of the specified array of objects to the debug output console using the
/// specified format information.
/// </summary>
/// <param name="module">Description of the module writing to the debug console</param>
/// <param name="format">A composite format string.</param>
/// <param name="arg">An array of objects to write using <paramref name="format"/>.</param>
/// <param name="arg">An array of objects to write using <paramref name="format" />.</param>
public static void DebugWrite(string module, string format, params object[] arg) =>
DebugWriteEvent?.Invoke("DEBUG (" + module + "): " + format, arg);
/// <summary>
/// Writes the specified string value, followed by the current line terminator, to the standard output console.
/// </summary>
/// <summary>Writes the specified string value, followed by the current line terminator, to the standard output console.</summary>
/// <param name="value">The value to write.</param>
public static void WriteLine(string value) => WriteLineEvent?.Invoke("{0}", value);
/// <summary>
/// Writes the specified string value, followed by the current line terminator, to the error output console.
/// </summary>
/// <summary>Writes the specified string value, followed by the current line terminator, to the error output console.</summary>
/// <param name="value">The value to write.</param>
public static void ErrorWriteLine(string value) => ErrorWriteLineEvent?.Invoke("{0}", value);
/// <summary>
/// Writes the specified string value, followed by the current line terminator, to the verbose output console.
/// </summary>
/// <summary>Writes the specified string value, followed by the current line terminator, to the verbose output console.</summary>
/// <param name="value">The value to write.</param>
public static void VerboseWriteLine(string value) => VerboseWriteLineEvent?.Invoke("{0}", value);
/// <summary>
/// Writes the specified string value, followed by the current line terminator, to the debug output console.
/// </summary>
/// <summary>Writes the specified string value, followed by the current line terminator, to the debug output console.</summary>
/// <param name="module">Description of the module writing to the debug console</param>
/// <param name="value">The value to write.</param>
public static void DebugWriteLine(string module, string value) =>