first commit
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
namespace OpenWarehouse.auth.api.Common.Exemptions;
|
||||
|
||||
public class AccountExemptions : Exception
|
||||
{
|
||||
private Dictionary<string, string> _otherProblem;
|
||||
private string _message;
|
||||
private bool _accountExist;
|
||||
|
||||
|
||||
public bool AccountExist
|
||||
{
|
||||
get => _accountExist;
|
||||
set => _accountExist = value;
|
||||
}
|
||||
|
||||
public string Message
|
||||
{
|
||||
get => _message;
|
||||
set => _message = value;
|
||||
}
|
||||
|
||||
public Dictionary<string, string> OtherProblem
|
||||
{
|
||||
get => _otherProblem;
|
||||
set => _otherProblem = value;
|
||||
}
|
||||
|
||||
public AccountExemptions(bool accountExist, string message, Dictionary<string, string>? otherProblem = null)
|
||||
{
|
||||
_otherProblem = otherProblem ?? new Dictionary<string, string>();
|
||||
_accountExist = accountExist;
|
||||
_message = message;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
namespace OpenWarehouse.auth.api.Common.Exemptions;
|
||||
|
||||
public class RoleExemptions : Exception
|
||||
{
|
||||
private Dictionary<string, string> _otherProblem;
|
||||
private string? _message;
|
||||
private bool _roleExist;
|
||||
|
||||
|
||||
public bool RoleExist
|
||||
{
|
||||
get => _roleExist;
|
||||
set => _roleExist = value;
|
||||
}
|
||||
|
||||
public override string Message => _message ?? "";
|
||||
|
||||
public Dictionary<string, string> OtherProblem
|
||||
{
|
||||
get => _otherProblem;
|
||||
set => _otherProblem = value;
|
||||
}
|
||||
|
||||
public RoleExemptions(bool accountExist = true, string? message = null, Dictionary<string, string>? otherProblem = null)
|
||||
{
|
||||
_otherProblem = otherProblem ?? new Dictionary<string, string>();
|
||||
_roleExist = accountExist;
|
||||
_message = message;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user