mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Move to file scoped namespaces.
This commit is contained in:
161
AaruConsole.cs
161
AaruConsole.cs
@@ -30,87 +30,87 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Console
|
||||
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.
|
||||
/// </summary>
|
||||
/// <param name="format">A composite format string.</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.
|
||||
/// </summary>
|
||||
/// <param name="format">A composite format string.</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.
|
||||
/// </summary>
|
||||
/// <param name="format">A composite format string.</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.
|
||||
/// </summary>
|
||||
/// <param name="format">A composite format string.</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.
|
||||
/// </summary>
|
||||
/// <param name="format">A composite format string.</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.
|
||||
/// </summary>
|
||||
/// <param name="format">A composite format string.</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.
|
||||
/// </summary>
|
||||
/// <param name="format">A composite format string.</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.
|
||||
/// </summary>
|
||||
/// <param name="format">A composite format string.</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.
|
||||
/// </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>
|
||||
public delegate void DebugWithModuleWriteLineHandler(string module, string format, params object[] arg);
|
||||
|
||||
/// <summary>
|
||||
/// Implements a console abstraction that defines four level of messages that can be routed to different consoles:
|
||||
/// standard, error, verbose and debug.
|
||||
/// </summary>
|
||||
public static class AaruConsole
|
||||
{
|
||||
/// <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.
|
||||
/// </summary>
|
||||
/// <param name="format">A composite format string.</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.
|
||||
/// </summary>
|
||||
/// <param name="format">A composite format string.</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.
|
||||
/// </summary>
|
||||
/// <param name="format">A composite format string.</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.
|
||||
/// </summary>
|
||||
/// <param name="format">A composite format string.</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.
|
||||
/// </summary>
|
||||
/// <param name="format">A composite format string.</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.
|
||||
/// </summary>
|
||||
/// <param name="format">A composite format string.</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.
|
||||
/// </summary>
|
||||
/// <param name="format">A composite format string.</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.
|
||||
/// </summary>
|
||||
/// <param name="format">A composite format string.</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.
|
||||
/// </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>
|
||||
public delegate void DebugWithModuleWriteLineHandler(string module, string format, params object[] arg);
|
||||
|
||||
/// <summary>
|
||||
/// Implements a console abstraction that defines four level of messages that can be routed to different consoles:
|
||||
/// standard, error, verbose and debug.
|
||||
/// </summary>
|
||||
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;
|
||||
/// <summary>Event to receive writings to the error output console that should be followed by a line termination.</summary>
|
||||
@@ -232,5 +232,4 @@ namespace Aaru.Console
|
||||
/// <param name="value">The value to write.</param>
|
||||
public static void DebugWriteLine(string module, string value) =>
|
||||
DebugWriteLineEvent?.Invoke("{0}", "DEBUG (" + module + "): " + value);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user