Revert "refactor(Dalamud): switch to file-scoped namespaces"

This reverts commit b5f34c3199.
This commit is contained in:
goat 2021-11-18 15:23:40 +01:00
parent d473826247
commit 1561fbac00
No known key found for this signature in database
GPG key ID: 7773BB5B43BA52E5
325 changed files with 45549 additions and 45209 deletions

View file

@ -1,21 +1,22 @@
namespace Dalamud.Plugin.Internal.Exceptions;
/// <summary>
/// This represents a banned plugin that attempted an operation.
/// </summary>
internal class BannedPluginException : PluginException
namespace Dalamud.Plugin.Internal.Exceptions
{
/// <summary>
/// Initializes a new instance of the <see cref="BannedPluginException"/> class.
/// This represents a banned plugin that attempted an operation.
/// </summary>
/// <param name="message">The message describing the invalid operation.</param>
public BannedPluginException(string message)
internal class BannedPluginException : PluginException
{
this.Message = message;
}
/// <summary>
/// Initializes a new instance of the <see cref="BannedPluginException"/> class.
/// </summary>
/// <param name="message">The message describing the invalid operation.</param>
public BannedPluginException(string message)
{
this.Message = message;
}
/// <summary>
/// Gets the message describing the invalid operation.
/// </summary>
public override string Message { get; }
/// <summary>
/// Gets the message describing the invalid operation.
/// </summary>
public override string Message { get; }
}
}

View file

@ -1,25 +1,26 @@
namespace Dalamud.Plugin.Internal.Exceptions;
/// <summary>
/// This exception that is thrown when a plugin is instructed to load while another plugin with the same
/// assembly name is already present and loaded.
/// </summary>
internal class DuplicatePluginException : PluginException
namespace Dalamud.Plugin.Internal.Exceptions
{
/// <summary>
/// Initializes a new instance of the <see cref="DuplicatePluginException"/> class.
/// This exception that is thrown when a plugin is instructed to load while another plugin with the same
/// assembly name is already present and loaded.
/// </summary>
/// <param name="assemblyName">Name of the conflicting assembly.</param>
public DuplicatePluginException(string assemblyName)
internal class DuplicatePluginException : PluginException
{
this.AssemblyName = assemblyName;
/// <summary>
/// Initializes a new instance of the <see cref="DuplicatePluginException"/> class.
/// </summary>
/// <param name="assemblyName">Name of the conflicting assembly.</param>
public DuplicatePluginException(string assemblyName)
{
this.AssemblyName = assemblyName;
}
/// <summary>
/// Gets the name of the conflicting assembly.
/// </summary>
public string AssemblyName { get; init; }
/// <inheritdoc/>
public override string Message => $"A plugin with the same assembly name of {this.AssemblyName} is already loaded";
}
/// <summary>
/// Gets the name of the conflicting assembly.
/// </summary>
public string AssemblyName { get; init; }
/// <inheritdoc/>
public override string Message => $"A plugin with the same assembly name of {this.AssemblyName} is already loaded";
}

View file

@ -1,24 +1,25 @@
using System;
using System.IO;
namespace Dalamud.Plugin.Internal.Exceptions;
/// <summary>
/// This exception represents a file that does not implement IDalamudPlugin.
/// </summary>
internal class InvalidPluginException : PluginException
namespace Dalamud.Plugin.Internal.Exceptions
{
/// <summary>
/// Initializes a new instance of the <see cref="InvalidPluginException"/> class.
/// This exception represents a file that does not implement IDalamudPlugin.
/// </summary>
/// <param name="dllFile">The invalid file.</param>
public InvalidPluginException(FileInfo dllFile)
internal class InvalidPluginException : PluginException
{
this.DllFile = dllFile;
}
/// <summary>
/// Initializes a new instance of the <see cref="InvalidPluginException"/> class.
/// </summary>
/// <param name="dllFile">The invalid file.</param>
public InvalidPluginException(FileInfo dllFile)
{
this.DllFile = dllFile;
}
/// <summary>
/// Gets the invalid file.
/// </summary>
public FileInfo DllFile { get; init; }
/// <summary>
/// Gets the invalid file.
/// </summary>
public FileInfo DllFile { get; init; }
}
}

View file

@ -1,23 +1,24 @@
using System;
namespace Dalamud.Plugin.Internal.Exceptions;
/// <summary>
/// This represents an invalid plugin operation.
/// </summary>
internal class InvalidPluginOperationException : PluginException
namespace Dalamud.Plugin.Internal.Exceptions
{
/// <summary>
/// Initializes a new instance of the <see cref="InvalidPluginOperationException"/> class.
/// This represents an invalid plugin operation.
/// </summary>
/// <param name="message">The message describing the invalid operation.</param>
public InvalidPluginOperationException(string message)
internal class InvalidPluginOperationException : PluginException
{
this.Message = message;
}
/// <summary>
/// Initializes a new instance of the <see cref="InvalidPluginOperationException"/> class.
/// </summary>
/// <param name="message">The message describing the invalid operation.</param>
public InvalidPluginOperationException(string message)
{
this.Message = message;
}
/// <summary>
/// Gets the message describing the invalid operation.
/// </summary>
public override string Message { get; }
/// <summary>
/// Gets the message describing the invalid operation.
/// </summary>
public override string Message { get; }
}
}

View file

@ -1,10 +1,11 @@
using System;
namespace Dalamud.Plugin.Internal.Exceptions;
/// <summary>
/// This represents the base Dalamud plugin exception.
/// </summary>
internal abstract class PluginException : Exception
namespace Dalamud.Plugin.Internal.Exceptions
{
/// <summary>
/// This represents the base Dalamud plugin exception.
/// </summary>
internal abstract class PluginException : Exception
{
}
}