Move to file scoped namespaces.

This commit is contained in:
2022-03-06 13:29:37 +00:00
parent 7098c95929
commit 5f5b96fffc

View File

@@ -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);
}
}