file scoped namespaces (#565)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
{
|
||||
public class AccountSetupCanceledException : System.Exception
|
||||
{
|
||||
namespace Wino.Core.Domain.Exceptions;
|
||||
|
||||
public class AccountSetupCanceledException : System.Exception
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,18 @@
|
||||
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
|
||||
{
|
||||
public AuthenticationAttentionException(MailAccount account)
|
||||
{
|
||||
Account = account;
|
||||
}
|
||||
namespace Wino.Core.Domain.Exceptions;
|
||||
|
||||
public MailAccount Account { get; }
|
||||
/// <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
|
||||
{
|
||||
public AuthenticationAttentionException(MailAccount account)
|
||||
{
|
||||
Account = account;
|
||||
}
|
||||
|
||||
public MailAccount Account { get; }
|
||||
}
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
{
|
||||
/// <summary>
|
||||
/// All exceptions related to authentication.
|
||||
/// </summary>
|
||||
public class AuthenticationException : Exception
|
||||
{
|
||||
public AuthenticationException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
namespace Wino.Core.Domain.Exceptions;
|
||||
|
||||
public AuthenticationException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
/// <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)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
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 { }
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
namespace Wino.Core.Domain.Exceptions;
|
||||
|
||||
/// <summary>
|
||||
/// Thrown when composer cant find the mime to load.
|
||||
/// </summary>
|
||||
public class ComposerMimeNotFoundException : Exception
|
||||
{
|
||||
/// <summary>
|
||||
/// Thrown when composer cant find the mime to load.
|
||||
/// </summary>
|
||||
public class ComposerMimeNotFoundException : Exception
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
namespace Wino.Core.Domain.Exceptions;
|
||||
|
||||
public class CustomThemeCreationFailedException : Exception
|
||||
{
|
||||
public class CustomThemeCreationFailedException : Exception
|
||||
public CustomThemeCreationFailedException(string message) : base(message)
|
||||
{
|
||||
public CustomThemeCreationFailedException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
namespace Wino.Core.Domain.Exceptions;
|
||||
|
||||
public class GoogleAuthenticationException : System.Exception
|
||||
{
|
||||
public class GoogleAuthenticationException : System.Exception
|
||||
{
|
||||
public GoogleAuthenticationException(string message) : base(message) { }
|
||||
}
|
||||
public GoogleAuthenticationException(string message) : base(message) { }
|
||||
}
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
{
|
||||
public class ImapClientPoolException : Exception
|
||||
{
|
||||
public ImapClientPoolException(Exception innerException, string protocolLog) : base(Translator.Exception_ImapClientPoolFailed, innerException)
|
||||
{
|
||||
ProtocolLog = protocolLog;
|
||||
}
|
||||
namespace Wino.Core.Domain.Exceptions;
|
||||
|
||||
public string ProtocolLog { get; }
|
||||
public class ImapClientPoolException : Exception
|
||||
{
|
||||
public ImapClientPoolException(Exception innerException, string protocolLog) : base(Translator.Exception_ImapClientPoolFailed, innerException)
|
||||
{
|
||||
ProtocolLog = protocolLog;
|
||||
}
|
||||
|
||||
public string ProtocolLog { get; }
|
||||
}
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
using Wino.Core.Domain.Models.AutoDiscovery;
|
||||
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
{
|
||||
public class ImapConnectionFailedPackage
|
||||
{
|
||||
public ImapConnectionFailedPackage(string errorMessage, string protocolLog, AutoDiscoverySettings settings)
|
||||
{
|
||||
ErrorMessage = errorMessage;
|
||||
ProtocolLog = protocolLog;
|
||||
Settings = settings;
|
||||
}
|
||||
namespace Wino.Core.Domain.Exceptions;
|
||||
|
||||
public AutoDiscoverySettings Settings { get; }
|
||||
public string ErrorMessage { get; set; }
|
||||
public string ProtocolLog { get; }
|
||||
public class ImapConnectionFailedPackage
|
||||
{
|
||||
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; }
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
{
|
||||
public class ImapSynchronizerStrategyException : System.Exception
|
||||
{
|
||||
public ImapSynchronizerStrategyException(string message) : base(message)
|
||||
{
|
||||
namespace Wino.Core.Domain.Exceptions;
|
||||
|
||||
public class ImapSynchronizerStrategyException : System.Exception
|
||||
{
|
||||
public ImapSynchronizerStrategyException(string message) : base(message)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
namespace Wino.Core.Domain.Exceptions;
|
||||
|
||||
public class ImapTestSSLCertificateException : System.Exception
|
||||
{
|
||||
public class ImapTestSSLCertificateException : System.Exception
|
||||
public ImapTestSSLCertificateException(string issuer, string expirationDateString, string 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; }
|
||||
|
||||
Issuer = issuer;
|
||||
ExpirationDateString = expirationDateString;
|
||||
ValidFromDateString = validFromDateString;
|
||||
}
|
||||
|
||||
public string Issuer { get; set; }
|
||||
public string ExpirationDateString { get; set; }
|
||||
public string ValidFromDateString { get; set; }
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
{
|
||||
public class InvalidMoveTargetException : Exception { }
|
||||
}
|
||||
namespace Wino.Core.Domain.Exceptions;
|
||||
|
||||
public class InvalidMoveTargetException : Exception { }
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
namespace Wino.Core.Domain.Exceptions;
|
||||
|
||||
public class MissingAliasException : System.Exception
|
||||
{
|
||||
public class MissingAliasException : System.Exception
|
||||
{
|
||||
public MissingAliasException() : base(Translator.Exception_MissingAlias) { }
|
||||
}
|
||||
public MissingAliasException() : base(Translator.Exception_MissingAlias) { }
|
||||
}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
namespace Wino.Core.Domain.Exceptions;
|
||||
|
||||
public class SynchronizerEntityNotFoundException : Exception
|
||||
{
|
||||
public class SynchronizerEntityNotFoundException : Exception
|
||||
public SynchronizerEntityNotFoundException(string message) : base(message)
|
||||
{
|
||||
public SynchronizerEntityNotFoundException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
{
|
||||
public class SynchronizerException : Exception
|
||||
{
|
||||
public SynchronizerException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
namespace Wino.Core.Domain.Exceptions;
|
||||
|
||||
public SynchronizerException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
public class SynchronizerException : Exception
|
||||
{
|
||||
public SynchronizerException(string message) : base(message)
|
||||
{
|
||||
}
|
||||
|
||||
public SynchronizerException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
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 { }
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
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
|
||||
{
|
||||
public UnavailableSpecialFolderException(SpecialFolderType specialFolderType, Guid accountId)
|
||||
{
|
||||
SpecialFolderType = specialFolderType;
|
||||
AccountId = accountId;
|
||||
}
|
||||
namespace Wino.Core.Domain.Exceptions;
|
||||
|
||||
public SpecialFolderType SpecialFolderType { get; }
|
||||
public Guid AccountId { get; set; }
|
||||
/// <summary>
|
||||
/// Emitted when special folder is needed for an operation but it couldn't be found.
|
||||
/// </summary>
|
||||
public class UnavailableSpecialFolderException : Exception
|
||||
{
|
||||
public UnavailableSpecialFolderException(SpecialFolderType specialFolderType, Guid accountId)
|
||||
{
|
||||
SpecialFolderType = specialFolderType;
|
||||
AccountId = accountId;
|
||||
}
|
||||
|
||||
public SpecialFolderType SpecialFolderType { get; }
|
||||
public Guid AccountId { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Exceptions
|
||||
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
|
||||
{
|
||||
/// <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) { }
|
||||
}
|
||||
public WinoServerException(string message) : base(message) { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user