Initial Commit ...
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
#
|
||||||
|
# DotNet ...
|
||||||
|
bin
|
||||||
|
obj
|
||||||
|
|
||||||
|
#
|
||||||
|
# Natural Docs ...
|
||||||
|
Documentation/*
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace xExceptions.Attributes
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// an attribute which attached to enums to carry propper string
|
||||||
|
/// </summary>
|
||||||
|
public partial class StringValueAttribute : System.Attribute {
|
||||||
|
public string StringValue { get; set; }
|
||||||
|
|
||||||
|
public StringValueAttribute (string value) {
|
||||||
|
this.StringValue = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,214 @@
|
|||||||
|
using xExceptions.Attributes;
|
||||||
|
|
||||||
|
namespace xExceptions.Constants
|
||||||
|
{
|
||||||
|
public enum XException {
|
||||||
|
//
|
||||||
|
#region Invalid Exceptions 1xx ...
|
||||||
|
[StringValue ("Invalid Data ...")]
|
||||||
|
InvalidData = 100,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Invalid Date ...")]
|
||||||
|
InvalidDate = 101,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Bad Request ...")]
|
||||||
|
BadRequest = 102,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Invalid Args ...")]
|
||||||
|
InvalidArgs = 103,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Invalid Message ...")]
|
||||||
|
InvalidMessage = 104,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Invalid Token ...")]
|
||||||
|
InvalidToken = 105,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Invalid Verification Code ...")]
|
||||||
|
InvalidVerificationCode = 106,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Invalid Email Address ...")]
|
||||||
|
InvalidEmailAddress = 107,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Invalid Mobile Number ...")]
|
||||||
|
InvalidMobileNumber = 108,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Invalid Password ...")]
|
||||||
|
InvalidPassword = 109,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Inavlid Url ...")]
|
||||||
|
InavlidUrl = 110,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Invalid Device ...")]
|
||||||
|
InvalidDevice = 111,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Invalid Profile Image ...")]
|
||||||
|
InvalidProfileImage = 112,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Invalid File ...")]
|
||||||
|
InavlidFile = 113,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Invalid Username ...")]
|
||||||
|
InvalidUserName = 114,
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//
|
||||||
|
#region Not (...) Exceptions 2xx ...
|
||||||
|
//
|
||||||
|
[StringValue ("Not Found ...")]
|
||||||
|
NotFound = 200,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Not Allowed ...")]
|
||||||
|
NotAllowed = 201,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Not Authorized ...")]
|
||||||
|
NotAuthorized = 202,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Not Visible ...")]
|
||||||
|
NotVisible = 203,
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//
|
||||||
|
#region User/Registration/Account/Bann Exceptions 3xx ...
|
||||||
|
//
|
||||||
|
[StringValue ("Account Locked out Until:{0}")]
|
||||||
|
AccountLockedOut = 300,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Login Failed ...")]
|
||||||
|
LoginFailed = 301,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("User Registered Before ...")]
|
||||||
|
UserRegisteredBefore = 302,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("User Disabled ...")]
|
||||||
|
UserDisabled = 303,
|
||||||
|
//
|
||||||
|
[StringValue ("Device Banned Until:{0}")]
|
||||||
|
DeviceBanned = 304,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("You can't Request Verification code Until:{0}")]
|
||||||
|
VerificationCodeResendNotAllowed = 305,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Passwords Same ...")]
|
||||||
|
PasswordsSame = 306,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Mobiles Same ...")]
|
||||||
|
MobilesSame = 307,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Emails Same ...")]
|
||||||
|
EmailsSame = 308,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Mobile In Used ...")]
|
||||||
|
MobileInUsed = 309,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Email In Used ...")]
|
||||||
|
EmailInUsed = 310,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Mobile Not Confirmed ...")]
|
||||||
|
MobileNotConfirmed = 311,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Email Not Confirmed ...")]
|
||||||
|
EmailNotConfirmed = 312,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Post Banned ...")]
|
||||||
|
PostBanned = 313,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("User Banned ...")]
|
||||||
|
UserBanned = 314,
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//
|
||||||
|
#region General Exceptions 4xx ...
|
||||||
|
//
|
||||||
|
[StringValue ("Unknown Error ...")]
|
||||||
|
Unknown = 400,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Duplicate ...")]
|
||||||
|
Duplicate = 401,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Action Failed ...")]
|
||||||
|
ActionFailed = 402,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Expired Date ...")]
|
||||||
|
ExpiredDate = 403,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Unavailable ...")]
|
||||||
|
Unavailable = 404,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Max Allowed Tag Exceeded ...")]
|
||||||
|
MaxAllowedTagExceeded = 405,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Timed out ...")]
|
||||||
|
Timeout = 406,
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//
|
||||||
|
#region File Exceptions 5xx ...
|
||||||
|
//
|
||||||
|
[StringValue ("Empty File ...")]
|
||||||
|
EmptyFile = 500,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("max File size exceeded ...")]
|
||||||
|
MaxFileSizeExceeded = 501,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Unsupported File Type ...")]
|
||||||
|
UnsupportedFileType = 502,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Max Allowed Media Exceeded ...")]
|
||||||
|
MaxAllowedMediaExceeded = 503,
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
//
|
||||||
|
#region Configuration Exceptions 6xx ...
|
||||||
|
//
|
||||||
|
[StringValue ("Invalid Configuration ...")]
|
||||||
|
InvalidConfiguration = 600,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Storage Service Initiallization Failed ...")]
|
||||||
|
StorageServiceInitialFailed = 601,
|
||||||
|
|
||||||
|
//
|
||||||
|
[StringValue ("Message Service Initialization Failed ...")]
|
||||||
|
MessageServiceInitialFailed = 602,
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
namespace xExceptions.Models {
|
||||||
|
public partial class XError {
|
||||||
|
/// <summary>
|
||||||
|
/// th ID of Error
|
||||||
|
/// </summary>
|
||||||
|
/// <value></value>
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// the String Value of Error
|
||||||
|
/// </summary>
|
||||||
|
/// <value></value>
|
||||||
|
public string Message { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# xExceptions
|
||||||
|
|
||||||
|
it is a Part of xDashboard on SaherElm IT Center which provides:
|
||||||
|
|
||||||
|
- All Exceptions and its related Extensions.
|
||||||
|
|
||||||
|
this module has no dependency and itself.
|
||||||
|
|
||||||
|
## Maintainer
|
||||||
|
|
||||||
|
Hadi Khazaee asl
|
||||||
|
|
||||||
|
[https://www.saherelm.ir](https://www.saherelm.ir)
|
||||||
|
|
||||||
|
[hadi_khazaee_asl@yahoo.com](mailto:hadi_khazaee_asl@yahoo.com)
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<packageSources>
|
||||||
|
<add key="nuget" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
||||||
|
<add key="liget" value="https://nuget.saherelmhub.ir/v3/index.json" protocolVersion="3" />
|
||||||
|
</packageSources>
|
||||||
|
</configuration>
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<!-- Runtime Definition -->
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
|
<PackageId>xDashboard.xExceptions</PackageId>
|
||||||
|
<Version>1.0.0</Version>
|
||||||
|
<Authors>Hadi Khazaee Asl</Authors>
|
||||||
|
<Company>SaherElm IT Center</Company>
|
||||||
|
<Description>
|
||||||
|
provide all Exceptions and its related actions/extensions and classes which required to xDashboard project.
|
||||||
|
</Description>
|
||||||
|
|
||||||
|
<!-- Icon Definition -->
|
||||||
|
<PackageIcon>icon.png</PackageIcon>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<!-- Icon Handling -->
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="../../Resources/Images/favicon.png" Link="icon.png" Pack="true" PackagePath="\icon.png" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
Reference in New Issue
Block a user