Revert "File scoped namespaces"

This reverts commit d31d8f574e.
This commit is contained in:
Burak Kaan Köse
2025-02-16 11:43:30 +01:00
parent d31d8f574e
commit cf9869b71e
617 changed files with 32097 additions and 31478 deletions

View File

@@ -1,6 +1,7 @@
namespace Wino.Core.Domain.Exceptions;
public class AccountSetupCanceledException : System.Exception
namespace Wino.Core.Domain.Exceptions
{
public class AccountSetupCanceledException : System.Exception
{
}
}

View File

@@ -1,18 +1,19 @@
using System;
using Wino.Core.Domain.Entities.Shared;
namespace Wino.Core.Domain.Exceptions;
/// <summary>
/// Thrown when IAuthenticator requires user interaction to fix authentication issues.
/// It can be expired and can't restorable token, or some stuff that requires re-authentication.
/// </summary>
public class AuthenticationAttentionException : Exception
namespace Wino.Core.Domain.Exceptions
{
public AuthenticationAttentionException(MailAccount account)
/// <summary>
/// Thrown when IAuthenticator requires user interaction to fix authentication issues.
/// It can be expired and can't restorable token, or some stuff that requires re-authentication.
/// </summary>
public class AuthenticationAttentionException : Exception
{
Account = account;
}
public AuthenticationAttentionException(MailAccount account)
{
Account = account;
}
public MailAccount Account { get; }
public MailAccount Account { get; }
}
}

View File

@@ -1,17 +1,18 @@
using System;
namespace Wino.Core.Domain.Exceptions;
/// <summary>
/// All exceptions related to authentication.
/// </summary>
public class AuthenticationException : Exception
namespace Wino.Core.Domain.Exceptions
{
public AuthenticationException(string message) : base(message)
/// <summary>
/// All exceptions related to authentication.
/// </summary>
public class AuthenticationException : Exception
{
}
public AuthenticationException(string message) : base(message)
{
}
public AuthenticationException(string message, Exception innerException) : base(message, innerException)
{
public AuthenticationException(string message, Exception innerException) : base(message, innerException)
{
}
}
}

View File

@@ -1,8 +1,9 @@
using System;
namespace Wino.Core.Domain.Exceptions;
/// <summary>
/// An exception thrown when the background task registration is failed.
/// </summary>
public class BackgroundTaskRegistrationFailedException : Exception { }
namespace Wino.Core.Domain.Exceptions
{
/// <summary>
/// An exception thrown when the background task registration is failed.
/// </summary>
public class BackgroundTaskRegistrationFailedException : Exception { }
}

View File

@@ -1,10 +1,11 @@
using System;
namespace Wino.Core.Domain.Exceptions;
/// <summary>
/// Thrown when composer cant find the mime to load.
/// </summary>
public class ComposerMimeNotFoundException : Exception
namespace Wino.Core.Domain.Exceptions
{
/// <summary>
/// Thrown when composer cant find the mime to load.
/// </summary>
public class ComposerMimeNotFoundException : Exception
{
}
}

View File

@@ -1,10 +1,11 @@
using System;
namespace Wino.Core.Domain.Exceptions;
public class CustomThemeCreationFailedException : Exception
namespace Wino.Core.Domain.Exceptions
{
public CustomThemeCreationFailedException(string message) : base(message)
public class CustomThemeCreationFailedException : Exception
{
public CustomThemeCreationFailedException(string message) : base(message)
{
}
}
}

View File

@@ -1,6 +1,7 @@
namespace Wino.Core.Domain.Exceptions;
public class GoogleAuthenticationException : System.Exception
namespace Wino.Core.Domain.Exceptions
{
public GoogleAuthenticationException(string message) : base(message) { }
public class GoogleAuthenticationException : System.Exception
{
public GoogleAuthenticationException(string message) : base(message) { }
}
}

View File

@@ -1,13 +1,14 @@
using System;
namespace Wino.Core.Domain.Exceptions;
public class ImapClientPoolException : Exception
namespace Wino.Core.Domain.Exceptions
{
public ImapClientPoolException(Exception innerException, string protocolLog) : base(Translator.Exception_ImapClientPoolFailed, innerException)
public class ImapClientPoolException : Exception
{
ProtocolLog = protocolLog;
}
public ImapClientPoolException(Exception innerException, string protocolLog) : base(Translator.Exception_ImapClientPoolFailed, innerException)
{
ProtocolLog = protocolLog;
}
public string ProtocolLog { get; }
public string ProtocolLog { get; }
}
}

View File

@@ -1,17 +1,18 @@
using Wino.Core.Domain.Models.AutoDiscovery;
namespace Wino.Core.Domain.Exceptions;
public class ImapConnectionFailedPackage
namespace Wino.Core.Domain.Exceptions
{
public ImapConnectionFailedPackage(string errorMessage, string protocolLog, AutoDiscoverySettings settings)
public class ImapConnectionFailedPackage
{
ErrorMessage = errorMessage;
ProtocolLog = protocolLog;
Settings = settings;
}
public ImapConnectionFailedPackage(string errorMessage, string protocolLog, AutoDiscoverySettings settings)
{
ErrorMessage = errorMessage;
ProtocolLog = protocolLog;
Settings = settings;
}
public AutoDiscoverySettings Settings { get; }
public string ErrorMessage { get; set; }
public string ProtocolLog { get; }
public AutoDiscoverySettings Settings { get; }
public string ErrorMessage { get; set; }
public string ProtocolLog { get; }
}
}

View File

@@ -1,9 +1,10 @@
namespace Wino.Core.Domain.Exceptions;
public class ImapSynchronizerStrategyException : System.Exception
namespace Wino.Core.Domain.Exceptions
{
public ImapSynchronizerStrategyException(string message) : base(message)
public class ImapSynchronizerStrategyException : System.Exception
{
public ImapSynchronizerStrategyException(string message) : base(message)
{
}
}
}

View File

@@ -1,16 +1,17 @@
namespace Wino.Core.Domain.Exceptions;
public class ImapTestSSLCertificateException : System.Exception
namespace Wino.Core.Domain.Exceptions
{
public ImapTestSSLCertificateException(string issuer, string expirationDateString, string validFromDateString)
public class ImapTestSSLCertificateException : System.Exception
{
Issuer = issuer;
ExpirationDateString = expirationDateString;
ValidFromDateString = validFromDateString;
public ImapTestSSLCertificateException(string issuer, string expirationDateString, string validFromDateString)
{
Issuer = issuer;
ExpirationDateString = expirationDateString;
ValidFromDateString = validFromDateString;
}
public string Issuer { get; set; }
public string ExpirationDateString { get; set; }
public string ValidFromDateString { get; set; }
}
public string Issuer { get; set; }
public string ExpirationDateString { get; set; }
public string ValidFromDateString { get; set; }
}

View File

@@ -1,5 +1,6 @@
using System;
namespace Wino.Core.Domain.Exceptions;
public class InvalidMoveTargetException : Exception { }
namespace Wino.Core.Domain.Exceptions
{
public class InvalidMoveTargetException : Exception { }
}

View File

@@ -1,6 +1,7 @@
namespace Wino.Core.Domain.Exceptions;
public class MissingAliasException : System.Exception
namespace Wino.Core.Domain.Exceptions
{
public MissingAliasException() : base(Translator.Exception_MissingAlias) { }
public class MissingAliasException : System.Exception
{
public MissingAliasException() : base(Translator.Exception_MissingAlias) { }
}
}

View File

@@ -1,10 +1,11 @@
using System;
namespace Wino.Core.Domain.Exceptions;
public class SynchronizerEntityNotFoundException : Exception
namespace Wino.Core.Domain.Exceptions
{
public SynchronizerEntityNotFoundException(string message) : base(message)
public class SynchronizerEntityNotFoundException : Exception
{
public SynchronizerEntityNotFoundException(string message) : base(message)
{
}
}
}

View File

@@ -1,14 +1,15 @@
using System;
namespace Wino.Core.Domain.Exceptions;
public class SynchronizerException : Exception
namespace Wino.Core.Domain.Exceptions
{
public SynchronizerException(string message) : base(message)
public class SynchronizerException : Exception
{
}
public SynchronizerException(string message) : base(message)
{
}
public SynchronizerException(string message, Exception innerException) : base(message, innerException)
{
public SynchronizerException(string message, Exception innerException) : base(message, innerException)
{
}
}
}

View File

@@ -1,6 +1,7 @@
namespace Wino.Core.Domain.Exceptions;
/// <summary>
/// When IMAP account's system folder configuration setup is not done yet.
/// </summary>
public class SystemFolderConfigurationMissingException : System.Exception { }
namespace Wino.Core.Domain.Exceptions
{
/// <summary>
/// When IMAP account's system folder configuration setup is not done yet.
/// </summary>
public class SystemFolderConfigurationMissingException : System.Exception { }
}

View File

@@ -1,19 +1,20 @@
using System;
using Wino.Core.Domain.Enums;
namespace Wino.Core.Domain.Exceptions;
/// <summary>
/// Emitted when special folder is needed for an operation but it couldn't be found.
/// </summary>
public class UnavailableSpecialFolderException : Exception
namespace Wino.Core.Domain.Exceptions
{
public UnavailableSpecialFolderException(SpecialFolderType specialFolderType, Guid accountId)
/// <summary>
/// Emitted when special folder is needed for an operation but it couldn't be found.
/// </summary>
public class UnavailableSpecialFolderException : Exception
{
SpecialFolderType = specialFolderType;
AccountId = accountId;
}
public UnavailableSpecialFolderException(SpecialFolderType specialFolderType, Guid accountId)
{
SpecialFolderType = specialFolderType;
AccountId = accountId;
}
public SpecialFolderType SpecialFolderType { get; }
public Guid AccountId { get; set; }
public SpecialFolderType SpecialFolderType { get; }
public Guid AccountId { get; set; }
}
}

View File

@@ -1,11 +1,12 @@
using System;
namespace Wino.Core.Domain.Exceptions;
/// <summary>
/// All server crash types. Wino Server ideally should not throw anything else than this Exception type.
/// </summary>
public class WinoServerException : Exception
namespace Wino.Core.Domain.Exceptions
{
public WinoServerException(string message) : base(message) { }
/// <summary>
/// All server crash types. Wino Server ideally should not throw anything else than this Exception type.
/// </summary>
public class WinoServerException : Exception
{
public WinoServerException(string message) : base(message) { }
}
}