diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3cd9a8e..1ef8d0e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,5 @@ -# This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). -# Copyright (c) 2021 SocialVoid.NET Authors. +# This file is part of Socialvoid.NET Project (https://github.com/Intellivoid/Socialvoid.NET). +# Copyright (c) 2021 Socialvoid.NET Authors. # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,7 +17,7 @@ version: 2 updates: - package-ecosystem: nuget - directory: "/SocialVoid" + directory: "/Socialvoid" schedule: interval: daily time: "15:00" diff --git a/.github/stale.yml b/.github/stale.yml index 97b7657..d0fe6d5 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -1,5 +1,5 @@ -# This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). -# Copyright (c) 2021 SocialVoid.NET Authors. +# This file is part of Socialvoid.NET Project (https://github.com/Intellivoid/Socialvoid.NET). +# Copyright (c) 2021 Socialvoid.NET Authors. # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/.github/workflows/dotnet-linux.yml b/.github/workflows/dotnet-linux.yml index 15867a1..46ca488 100644 --- a/.github/workflows/dotnet-linux.yml +++ b/.github/workflows/dotnet-linux.yml @@ -1,5 +1,5 @@ -# This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). -# Copyright (c) 2021 SocialVoid.NET Authors. +# This file is part of Socialvoid.NET Project (https://github.com/Intellivoid/Socialvoid.NET). +# Copyright (c) 2021 Socialvoid.NET Authors. # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/.github/workflows/dotnet-windows.yml b/.github/workflows/dotnet-windows.yml index a7572aa..48ff396 100644 --- a/.github/workflows/dotnet-windows.yml +++ b/.github/workflows/dotnet-windows.yml @@ -1,5 +1,5 @@ -# This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). -# Copyright (c) 2021 SocialVoid.NET Authors. +# This file is part of Socialvoid.NET Project (https://github.com/Intellivoid/Socialvoid.NET). +# Copyright (c) 2021 Socialvoid.NET Authors. # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/CODESTYLE.md b/CODESTYLE.md index a9f88c1..de947e9 100755 --- a/CODESTYLE.md +++ b/CODESTYLE.md @@ -1,6 +1,6 @@ -> #### NOTE: This code style standard for SocialVoid.NET is a work in progress and much of the code does not currently conform to these rules. This is something that will be addressed by the core team. +> #### NOTE: This code style standard for Socialvoid.NET is a work in progress and much of the code does not currently conform to these rules. This is something that will be addressed by the core team. # Introduction -As the SocialVoid.NET project gains more traction and becomes more widely used, we aim to provide a more professional and consistent look to the large amount of source now in the project. It was a broadly supported decision by the core development team to follow the Microsoft coding guidelines (the default provided in Visual Studio's C# editor). These coding guidelines listed below are based on a [MSDN blog post](http://blogs.msdn.com/b/brada/archive/2005/01/26/361363.aspx) from 2005 by Brad Abrams describing the internal coding guidelines at Microsoft, with some changes to suit our project. +As the Socialvoid.NET project gains more traction and becomes more widely used, we aim to provide a more professional and consistent look to the large amount of source now in the project. It was a broadly supported decision by the core development team to follow the Microsoft coding guidelines (the default provided in Visual Studio's C# editor). These coding guidelines listed below are based on a [MSDN blog post](http://blogs.msdn.com/b/brada/archive/2005/01/26/361363.aspx) from 2005 by Brad Abrams describing the internal coding guidelines at Microsoft, with some changes to suit our project. # Coding Guidelines ## Tabs & Indenting @@ -117,8 +117,8 @@ Comments must provide added value or explanation to the code. Simply describing Each file **should** start with a copyright notice. This is a short statement declaring the project name and copyright notice, and directing the reader to the license document elsewhere in the project. To avoid errors in doc comment builds, avoid using triple-slash doc comments. ```csharp /* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. + * This file is part of Socialvoid.NET Project (https://github.com/Intellivoid/Socialvoid.NET). + * Copyright (c) 2021 Socialvoid.NET Authors. * * This library is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -254,7 +254,7 @@ In addition, the goal is to have clean, readable source. Code legibility should ## File Organization * Source files should contain only one public type, although multiple internal types are permitted if required. * Source files should be given the name of the public type in the file. -* Directory names should follow the namespace for the class after `SocialVoid`. For example, one would expect to find the public class `SocialVoid.Constants.WotoTools` in **SocialVoid\Constants\WotoTools.cs**. +* Directory names should follow the namespace for the class after `Socialvoid`. For example, one would expect to find the public class `Socialvoid.Constants.WotoTools` in **Socialvoid\Constants\WotoTools.cs**. * Class members should be grouped logically, and encapsulated into regions: ```csharp diff --git a/README.md b/README.md index 15fca83..51a9495 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# SocialVoid.NET \ No newline at end of file +# Socialvoid.NET \ No newline at end of file diff --git a/SocialVoid.png b/SocialVoid.png deleted file mode 100644 index 7bfa7cd..0000000 Binary files a/SocialVoid.png and /dev/null differ diff --git a/SocialVoid.sln b/SocialVoid.sln deleted file mode 100644 index 11814ff..0000000 --- a/SocialVoid.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SocialVoid", "SocialVoid\SocialVoid.csproj", "{6CB5C21A-EB16-48D6-B98A-F18D7CE46785}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBD}") = "Tests", "Tests\Tests.csproj", "{2EFF7FAB-7794-4BFA-AB48-998ADADC45A9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {6CB5C21A-EB16-48D6-B98A-F18D7CE46785}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6CB5C21A-EB16-48D6-B98A-F18D7CE46785}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6CB5C21A-EB16-48D6-B98A-F18D7CE46785}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6CB5C21A-EB16-48D6-B98A-F18D7CE46785}.Release|Any CPU.Build.0 = Release|Any CPU - {2EFF7FAB-7794-4BFA-AB48-998ADADC45A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2EFF7FAB-7794-4BFA-AB48-998ADADC45A9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2EFF7FAB-7794-4BFA-AB48-998ADADC45A9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2EFF7FAB-7794-4BFA-AB48-998ADADC45A9}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection -EndGlobal diff --git a/SocialVoid/Client/SocialvoidClient.cs b/SocialVoid/Client/SocialvoidClient.cs deleted file mode 100644 index 8c0a1a0..0000000 --- a/SocialVoid/Client/SocialvoidClient.cs +++ /dev/null @@ -1,22 +0,0 @@ -using SocialVoid.Methods; - -namespace SocialVoid.Client -{ - class SocialvoidClient - { - public string PUB_HASH, PVT_HASH, SOCIALVOID_PLATFORM, SOCIALVOID_VERSION; - public SocialvoidClient(string public_hash, string private_hash, string platform, string version) - { - PUB_HASH = public_hash; - PVT_HASH = private_hash; - SOCIALVOID_PLATFORM = platform; - SOCIALVOID_VERSION = version; - - - bool createsession() - { - return Methods.CreateSession.Do(PUB_HASH, PVT_HASH, SOCIALVOID_PLATFORM, SOCIALVOID_VERSION); - } - } - } -} diff --git a/SocialVoid/Errors/AuthenticationErrors/AlreadyAuthenticatedException.cs b/SocialVoid/Errors/AuthenticationErrors/AlreadyAuthenticatedException.cs deleted file mode 100644 index 772d7c5..0000000 --- a/SocialVoid/Errors/AuthenticationErrors/AlreadyAuthenticatedException.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.NetworkErrors -{ - /// - /// This exception will be raised when the client is attempting - /// to authenticate when already authenticated. - /// Since: v0.0.0 - /// - public sealed class AlreadyAuthenticatedException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the client is attempting to - /// authenticate while it's already authenticated. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.AlreadyAuthenticated; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal AlreadyAuthenticatedException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/AuthenticationErrors/AuthenticationFailureException.cs b/SocialVoid/Errors/AuthenticationErrors/AuthenticationFailureException.cs deleted file mode 100644 index d53832c..0000000 --- a/SocialVoid/Errors/AuthenticationErrors/AuthenticationFailureException.cs +++ /dev/null @@ -1,88 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.NetworkErrors -{ - /// - /// This exception will be raised when the authentication process failed - /// for some unexpected reason; you need to see the exception message - /// for further details. - /// Since: v0.0.0 - /// - public sealed class AuthenticationFailureException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the authentication process failed - /// for some unexpected reason; - /// please see the message for further details. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.AuthenticationFailure; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of - /// . - /// Since: v0.0.0 - /// - internal AuthenticationFailureException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/AuthenticationErrors/AuthenticationNotApplicableException.cs b/SocialVoid/Errors/AuthenticationErrors/AuthenticationNotApplicableException.cs deleted file mode 100644 index d1f2b7d..0000000 --- a/SocialVoid/Errors/AuthenticationErrors/AuthenticationNotApplicableException.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.NetworkErrors -{ - /// - /// This exception will be raised when the user does not support - /// this method of authentication; - /// please see the message for further details. - /// Since: v0.0.0 - /// - public sealed class AuthenticationNotApplicableException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the user does not support this method - /// of authentication; please see the message for further details. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.AuthenticationNotApplicable; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of - /// . - /// Since: v0.0.0 - /// - internal AuthenticationNotApplicableException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/AuthenticationErrors/BadSessionChallengeAnswerException.cs b/SocialVoid/Errors/AuthenticationErrors/BadSessionChallengeAnswerException.cs deleted file mode 100644 index 1913d33..0000000 --- a/SocialVoid/Errors/AuthenticationErrors/BadSessionChallengeAnswerException.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.NetworkErrors -{ - /// - /// This exception will be raised when the given session challenge answer - /// is incorrect or out of sync. - /// Since: v0.0.0 - /// - public sealed class BadSessionChallengeAnswerException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the given session challenge answer - /// is incorrect or out of sync. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.BadSessionChallengeAnswer; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal BadSessionChallengeAnswerException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/AuthenticationErrors/IncorrectLoginCredentialsException.cs b/SocialVoid/Errors/AuthenticationErrors/IncorrectLoginCredentialsException.cs deleted file mode 100644 index a5925b3..0000000 --- a/SocialVoid/Errors/AuthenticationErrors/IncorrectLoginCredentialsException.cs +++ /dev/null @@ -1,84 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.NetworkErrors -{ - /// - /// This exception will be raised when the given login credentials - /// are incorrect. - /// Since: v0.0.0 - /// - public sealed class IncorrectLoginCredentialsException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the given login credentials are incorrect. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.IncorrectLoginCredentials; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal IncorrectLoginCredentialsException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/AuthenticationErrors/IncorrectTwoFactorAuthenticationCodeException.cs b/SocialVoid/Errors/AuthenticationErrors/IncorrectTwoFactorAuthenticationCodeException.cs deleted file mode 100644 index d2db0eb..0000000 --- a/SocialVoid/Errors/AuthenticationErrors/IncorrectTwoFactorAuthenticationCodeException.cs +++ /dev/null @@ -1,86 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.NetworkErrors -{ - /// - /// This exception will be raised when the given two-factor - /// authentication code is incorrect. - /// Since: v0.0.0 - /// - public sealed class IncorrectTwoFactorAuthenticationCodeException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the given two-factor authentication code - /// is incorrect. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.IncorrectTwoFactorAuthenticationCode; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of - /// . - /// Since: v0.0.0 - /// - internal IncorrectTwoFactorAuthenticationCodeException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/AuthenticationErrors/NotAuthenticatedException.cs b/SocialVoid/Errors/AuthenticationErrors/NotAuthenticatedException.cs deleted file mode 100644 index 37b4768..0000000 --- a/SocialVoid/Errors/AuthenticationErrors/NotAuthenticatedException.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.NetworkErrors -{ - /// - /// This exception will be raised when the client attempts to - /// invoke a method that requires authentication. - /// Since: v0.0.0 - /// - public sealed class NotAuthenticatedException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the client attempts - /// to invoke a method that requires authentication. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.NotAuthenticated; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal NotAuthenticatedException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/AuthenticationErrors/PrivateAccessTokenRequiredException.cs b/SocialVoid/Errors/AuthenticationErrors/PrivateAccessTokenRequiredException.cs deleted file mode 100644 index 1608807..0000000 --- a/SocialVoid/Errors/AuthenticationErrors/PrivateAccessTokenRequiredException.cs +++ /dev/null @@ -1,88 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.NetworkErrors -{ - /// - /// This exception will be raised when the user/entity uses a - /// Private Access Token to authenticate and the client attempted - /// to authenticate in another way. - /// Since: v0.0.0 - /// - public sealed class PrivateAccessTokenRequiredException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the user/entity uses a - /// Private Access Token to authenticate and the client attempted - /// to authenticate in another way. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.PrivateAccessTokenRequired; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of - /// . - /// Since: v0.0.0 - /// - internal PrivateAccessTokenRequiredException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/AuthenticationErrors/README.md b/SocialVoid/Errors/AuthenticationErrors/README.md deleted file mode 100644 index 4241c35..0000000 --- a/SocialVoid/Errors/AuthenticationErrors/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Authentication Errors - -These errors are raised when anything related to authentication has failed, -this can include things from when trying to authenticate to session -challenge errors. - -| Name | Code | Hex Code | Deprecated | Versions | Description | -|--------------------------------------|------|----------|------------|----------|--------------------------------------------------------------------------------------------------------------------------------------| -| IncorrectLoginCredentials | 8704 | 0x02200 | No | 1.0 | The given login credentials are incorrect | -| IncorrectTwoFactorAuthenticationCode | 8705 | 0x02201 | No | 1.0 | The given two-factor authentication code is incorrect | -| AuthenticationNotApplicable | 8706 | 0x02202 | No | 1.0 | Raised when the user does not support this method of authentication, see the message for further details | -| SessionNotFound | 8707 | 0x02203 | No | 1.0 | Raised when the requested session was not found in the network | -| NotAuthenticated | 8708 | 0x02204 | No | 1.0 | Raised when the client attempts to invoke a method that requires authentication | -| PrivateAccessTokenRequired | 8709 | 0x02205 | No | 1.0 | Raised when the user/entity uses a Private Access Token to authenticate and the client attempted to authenticate in another way. | -| AuthenticationFailure | 8710 | 0x02206 | No | 1.0 | The authentication process failed for some unexpected reason, see the message for further details. | -| BadSessionChallengeAnswer | 8711 | 0x02207 | No | 1.0 | The given session challenge answer is incorrect or out of sync. | -| TwoFactorAuthenticationRequired | 8712 | 0x02208 | No | 1.0 | Two-Factor Authentication is required, the client must repeat the same request but provide a Two-Factor authentication code as well. | -| AlreadyAuthenticated | 8713 | 0x02209 | No | 1.0 | The client is attempting to authenticate when already authenticated | -| SessionExpired | 8714 | 0x0220a | No | 1.0 | Raised when trying to use a session that has expired | \ No newline at end of file diff --git a/SocialVoid/Errors/AuthenticationErrors/SessionExpiredException.cs b/SocialVoid/Errors/AuthenticationErrors/SessionExpiredException.cs deleted file mode 100644 index 78707bd..0000000 --- a/SocialVoid/Errors/AuthenticationErrors/SessionExpiredException.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.NetworkErrors -{ - /// - /// This exception will be raised when the client tried to use a session - /// that has been expired. - /// Since: v0.0.0 - /// - public sealed class SessionExpiredException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the client tried to use a session - /// that has been expired. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.SessionExpired; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal SessionExpiredException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/AuthenticationErrors/SessionNotFoundException.cs b/SocialVoid/Errors/AuthenticationErrors/SessionNotFoundException.cs deleted file mode 100644 index bd1e34a..0000000 --- a/SocialVoid/Errors/AuthenticationErrors/SessionNotFoundException.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.NetworkErrors -{ - /// - /// This exception will be raised when the requested session can - /// not be found in the database on server-side. - /// Since: v0.0.0 - /// - public sealed class SessionNotFoundException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the requested session was - /// not found in the database on server-side. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.SessionNotFound; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal SessionNotFoundException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/AuthenticationErrors/TwoFactorAuthenticationRequiredException.cs b/SocialVoid/Errors/AuthenticationErrors/TwoFactorAuthenticationRequiredException.cs deleted file mode 100644 index 8f46171..0000000 --- a/SocialVoid/Errors/AuthenticationErrors/TwoFactorAuthenticationRequiredException.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.NetworkErrors -{ - /// - /// This exception will be raised when the Two-Factor Authentication - /// is required and so the client must repeat the same request - /// but provide a Two-Factor authentication code as well. - /// Since: v0.0.0 - /// - public sealed class TwoFactorAuthenticationRequiredException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The - /// error code will be returned because the Two-Factor Authentication - /// is required and so the client must repeat the same request - /// but provide a Two-Factor authentication code as well. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.TwoFactorAuthenticationRequired; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal TwoFactorAuthenticationRequiredException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/ErrorCodes.cs b/SocialVoid/Errors/ErrorCodes.cs deleted file mode 100644 index 6a959d3..0000000 --- a/SocialVoid/Errors/ErrorCodes.cs +++ /dev/null @@ -1,273 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors -{ - /// - /// All error codes received from the SocialVoid servers. - /// Since: v0.0.0 - /// - public enum ErrorCodes - { - //------------------------------------------------- - #region Unknown Error - /// - /// This error code will be returned when the error is not - /// implimented on client-side at all. - /// Since: v0.0.0 - /// - UnknownError = 0, - #endregion - //------------------------------------------------- - #region Validation Errors - /// - /// This error code will be returned when the given username - /// is invalid and does not meet the specification. - /// Since: v0.0.0 - /// - /// - InvalidUsername = 8448, - /// - /// This error code will be returned when the given password is - /// invalid and/or insecure and does not meet the specification. - /// Since: v0.0.0 - /// - InvalidPassword = 8449, - /// - /// This error code will be returned when the First Name provided - /// contains invalid characters and or is too long; - /// please see the message for further details. - /// Since: v0.0.0 - /// - InvalidFirstName = 8450, - /// - /// This error code will be returned when the Last Name provided - /// contains invalid characters and or is too long; - /// please see the message for further details. - /// Since: v0.0.0 - /// - InvalidLastName = 8451, - /// - /// This error code will be returned when the Biography is too long or - /// contains invalid characters; - /// please see the message for further details. - /// Since: v0.0.0 - /// - InvalidBiography = 8452, - /// - /// This error code will be returned when the given username - /// is already registered in the server and cannot be used. - /// Since: v0.0.0 - /// - UsernameAlreadyExists = 8453, - /// - /// This error code will be returned when the client provided - /// an invalid peer identification as input. - /// Since: v0.0.0 - /// - InvalidPeerInput = 8454, - /// - /// This error code will be returned when the post contains - /// invalid characters or is too long; - /// please see the message for further details. - /// Since: v0.0.0 - /// - InvalidPostText = 8455, - /// - /// This error code will be returned when the client's public hash - /// is invalid and cannot be identified as a sha256. - /// Since: v0.0.0 - /// - InvalidClientPublicHash = 8456, - /// - /// This error code will be returned when the client's private hash - /// is invalid and cannot be identified as a sha256. - /// Since: v0.0.0 - /// - InvalidClientPrivateHash = 8457, - /// - /// This error code will be returned when the version is invalid - /// or is too long; - /// please see the message for further details. - /// Since: v0.0.0 - /// - InvalidVersion = 8459, - /// - /// This error code will be returned when the client name contains - /// invalid characters or is too long; - /// please see the message for further details. - /// Since: v0.0.0 - /// - InvalidClientName = 8460, - /// - /// This error code will be returned when the session identification - /// object is invalid; - /// please see the message for further details. - /// Since: v0.0.0 - /// - InvalidSessionIdentification = 8461, - - /// - /// This error code will be returned when the platform name contains - /// invalid characters or is too long; - /// please see the message for further details. - /// Since: v0.0.0 - /// - InvalidPlatform = 8464, - #endregion - //------------------------------------------------- - #region Authentication Errors - /// - /// This error code will be returned when the given login credentials - /// are incorrect. - /// Since: v0.0.0 - /// - /// - IncorrectLoginCredentials = 8704, - /// - /// This error code will be returned when the given two-factor - /// authentication code is incorrect. - /// Since: v0.0.0 - /// - IncorrectTwoFactorAuthenticationCode = 8705, - /// - /// This error code will be returned when the user does not support - /// this method of authentication; - /// please see the message for further details. - /// Since: v0.0.0 - /// - AuthenticationNotApplicable = 8706, - /// - /// This error code will be returned when the requested session - /// was not found in the database on server-side. - /// Since: v0.0.0 - /// - SessionNotFound = 8707, - /// - /// This error code will be returned when the client attempts - /// to invoke a method that requires authentication. - /// Since: v0.0.0 - /// - NotAuthenticated = 8708, - /// - /// This error code will be returned when the user/entity uses - /// a Private Access Token to authenticate and the client - /// attempted to authenticate in another way. - /// Since: v0.0.0 - /// - PrivateAccessTokenRequired = 8709, - /// - /// This error code will be returned when the authentication process - /// failed for some unexpected reason; - /// please see the message for further details. - /// Since: v0.0.0 - /// - AuthenticationFailure = 8710, - /// - /// This error code will be returned when the given session - /// challenge answer is incorrect or out of sync. - /// Since: v0.0.0 - /// - BadSessionChallengeAnswer = 8711, - /// - /// This error code will be returned when the Two-Factor - /// Authentication is required and so the client must repeat - /// the same request but provide a Two-Factor authentication - /// code as well. - /// Since: v0.0.0 - /// - TwoFactorAuthenticationRequired = 8712, - /// - /// This error code will be returned when the client is attempting - /// to authenticate when already authenticated. - /// Since: v0.0.0 - /// - AlreadyAuthenticated = 8713, - /// - /// This error code will be returned when trying to use a - /// session that has been expired. - /// Since: v0.0.0 - /// - SessionExpired = 8714, - #endregion - //------------------------------------------------- - #region Media Errors - // TODO: This part is a work in progress, - // media has yet to be implemented on the server-side. - #endregion - //------------------------------------------------- - #region Network Errors - /// - /// This error code will be returned when the requested user entity - /// was not found on the server-side. - /// Since: v0.0.0 - /// - /// - PeerNotFound = 12544, - /// - /// This error code will be returned when the client requested - /// a post that isn't found (or does not exist on the server-side). - /// Since: v0.0.0 - /// - PostNotFound = 12545, - /// - /// This error code will be returned when the client requested a post - /// that was deleted. - /// Since: v0.0.0 - /// - PostDeleted = 12546, - /// - /// This error code will be returned when the client attempts to - /// repost a post that has already been reposted (by the same user). - /// Since: v0.0.0 - /// - AlreadyReposted = 12547, - /// - /// This error code will be returned when there was an error while - /// trying to upload one or more files to the server. - /// Since: v0.0.0 - /// - FileUploadError = 12548, - #endregion - //------------------------------------------------- - #region Server Errors - /// - /// This error code will be returned when there was an unexpected - /// error while trying to process your request. - /// Since: v0.0.0 - /// - /// - InternalServerError = 16384, - #endregion - //------------------------------------------------- - } -} - diff --git a/SocialVoid/Errors/GeneralException.cs b/SocialVoid/Errors/GeneralException.cs deleted file mode 100644 index a185fbd..0000000 --- a/SocialVoid/Errors/GeneralException.cs +++ /dev/null @@ -1,203 +0,0 @@ -using System; -using SocialVoid.Errors.ServerErrors; -using SocialVoid.Errors.NetworkErrors; -using SocialVoid.Errors.ValidationErrors; - -namespace SocialVoid.Errors -{ - /// - /// - /// Since: v0.0.0 - /// - public class GeneralException : Exception - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code of this exception which is received from - /// the server. - /// - /// This property needs to be overrided in specific exception - /// classes of this library. - /// - /// Since: v0.0.0 - /// - public virtual ErrorCodes ErrorCode { get; } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - /// - /// the error message received from the server. - /// - - internal GeneralException(string message) : base(message) - { - - } - /// - /// Creates a new instance of using - /// the specified error message and erro code. - /// Since: v0.0.0 - /// - /// - /// the error message received from the server. - /// - /// - /// the error code received from the server. - /// - private GeneralException(string message, ErrorCodes code) : base(message) - { - ErrorCode = code; - } - - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - #region Initialize Method's Region - // some methods here - #endregion - //------------------------------------------------- - #region Graphical Method's Region - // some methods here - #endregion - //------------------------------------------------- - #region event Method's Region - // some methods here - #endregion - //------------------------------------------------- - #region overrided Method's Region - // some methods here - #endregion - //------------------------------------------------- - #region ordinary Method's Region - // some methods here - #endregion - //------------------------------------------------- - #region Get Method's Region - // some methods here - #endregion - //------------------------------------------------- - #region Set Method's Region - // some methods here - #endregion - //------------------------------------------------- - #region static Method's Region - /// - /// GetException will return a new exception based on the - /// error code received from the server with the specified - /// error message. - /// Since: v0.0.0 - /// - public static GeneralException GetException(string m, ErrorCodes err) - { - return err switch - { - // Unknown Error - ErrorCodes.UnknownError => new(m), - // Validation Errors - ErrorCodes.InvalidUsername => - new InvalidUsernameException(m), - ErrorCodes.InvalidPassword => - new InvalidPasswordException(m), - ErrorCodes.InvalidFirstName => - new InvalidFirstNameException(m), - ErrorCodes.InvalidLastName => - new InvalidLastNameException(m), - ErrorCodes.InvalidBiography => - new InvalidBiographyException(m), - ErrorCodes.UsernameAlreadyExists => - new UsernameAlreadyExistsException(m), - ErrorCodes.InvalidPeerInput => - new InvalidPeerInputException(m), - ErrorCodes.InvalidPostText => - new InvalidPostTextException(m), - ErrorCodes.InvalidClientPublicHash => - new InvalidClientPublicHashException(m), - ErrorCodes.InvalidClientPrivateHash => - new InvalidClientPrivateHashException(m), - ErrorCodes.InvalidVersion => - new InvalidVersionException(m), - ErrorCodes.InvalidClientName => - new InvalidClientNameException(m), - ErrorCodes.InvalidSessionIdentification => - new InvalidSessionIdentificationException(m), - ErrorCodes.InvalidPlatform => - new InvalidPlatformException(m), - // Authentication Errors - ErrorCodes.IncorrectLoginCredentials => - new IncorrectLoginCredentialsException(m), - ErrorCodes.IncorrectTwoFactorAuthenticationCode => - new IncorrectTwoFactorAuthenticationCodeException(m), - ErrorCodes.AuthenticationNotApplicable => - new AuthenticationNotApplicableException(m), - ErrorCodes.SessionNotFound => - new SessionNotFoundException(m), - ErrorCodes.NotAuthenticated => - new NotAuthenticatedException(m), - ErrorCodes.PrivateAccessTokenRequired => - new PrivateAccessTokenRequiredException(m), - ErrorCodes.AuthenticationFailure => - new AuthenticationFailureException(m), - ErrorCodes.BadSessionChallengeAnswer => - new BadSessionChallengeAnswerException(m), - ErrorCodes.TwoFactorAuthenticationRequired => - new TwoFactorAuthenticationRequiredException(m), - ErrorCodes.AlreadyAuthenticated => - new AlreadyAuthenticatedException(m), - ErrorCodes.SessionExpired => - new SessionExpiredException(m), - // Media Errors - // Network Errors - ErrorCodes.PeerNotFound => - new PeerNotFoundException(m), - ErrorCodes.PostNotFound => - new PostNotFoundException(m), - ErrorCodes.PostDeleted => - new PostDeletedException(m), - ErrorCodes.AlreadyReposted => - new AlreadyRepostedException(m), - ErrorCodes.FileUploadError => - new FileUploadErrorException(m), - // Server Errors - ErrorCodes.InternalServerError => - new InternalServerErrorException(m), - - // an unknown error code? - _ => new(m, err) - }; - } - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/MediaErrors/README.md b/SocialVoid/Errors/MediaErrors/README.md deleted file mode 100644 index 884a654..0000000 --- a/SocialVoid/Errors/MediaErrors/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# MediaErrors - -This part is a work in progress, media has yet to be implemented. \ No newline at end of file diff --git a/SocialVoid/Errors/NetworkErrors/AlreadyRepostedException.cs b/SocialVoid/Errors/NetworkErrors/AlreadyRepostedException.cs deleted file mode 100644 index 353b2b2..0000000 --- a/SocialVoid/Errors/NetworkErrors/AlreadyRepostedException.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.NetworkErrors -{ - /// - /// This exception will be raised when the client attempts to repost a - /// post that has already been reposted (by the same user). - /// Since: v0.0.0 - /// - public sealed class AlreadyRepostedException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the client attempted to repost a - /// post that has already been reposted (by the same user). - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.AlreadyReposted; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal AlreadyRepostedException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} \ No newline at end of file diff --git a/SocialVoid/Errors/NetworkErrors/FileUploadErrorException.cs b/SocialVoid/Errors/NetworkErrors/FileUploadErrorException.cs deleted file mode 100644 index bd6a631..0000000 --- a/SocialVoid/Errors/NetworkErrors/FileUploadErrorException.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.NetworkErrors -{ - /// - /// This exception will be raised when there was an error while trying to - /// upload one or more files to the server. - /// Since: v0.0.0 - /// - public sealed class FileUploadErrorException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because there was an error while trying to - /// upload one or more files to the server. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.FileUploadError; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal FileUploadErrorException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/NetworkErrors/PeerNotFoundException.cs b/SocialVoid/Errors/NetworkErrors/PeerNotFoundException.cs deleted file mode 100644 index e8f7528..0000000 --- a/SocialVoid/Errors/NetworkErrors/PeerNotFoundException.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.NetworkErrors -{ - /// - /// This exception will be raised when the requested user entity - /// can not be not found on the server-side. - /// Since: v0.0.0 - /// - public sealed class PeerNotFoundException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the requested user entity was not found - /// on the server-side. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.PeerNotFound; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal PeerNotFoundException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/NetworkErrors/PostDeletedException.cs b/SocialVoid/Errors/NetworkErrors/PostDeletedException.cs deleted file mode 100644 index b038146..0000000 --- a/SocialVoid/Errors/NetworkErrors/PostDeletedException.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.NetworkErrors -{ - /// - /// This exception will be raised when the client requests a post that - /// is deleted. - /// Since: v0.0.0 - /// - public sealed class PostDeletedException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the client requested a post that - /// was deleted. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.PostDeleted; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal PostDeletedException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} \ No newline at end of file diff --git a/SocialVoid/Errors/NetworkErrors/PostNotFoundException.cs b/SocialVoid/Errors/NetworkErrors/PostNotFoundException.cs deleted file mode 100644 index fb7d627..0000000 --- a/SocialVoid/Errors/NetworkErrors/PostNotFoundException.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.NetworkErrors -{ - /// - /// This exception will be raised when the client requests a post that - /// isn't found (or does not exist on the server-side). - /// Since: v0.0.0 - /// - public sealed class PostNotFoundException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the client requested a post that - /// isn't found (or does not exist on the server-side). - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.PostNotFound; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal PostNotFoundException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} \ No newline at end of file diff --git a/SocialVoid/Errors/NetworkErrors/README.md b/SocialVoid/Errors/NetworkErrors/README.md deleted file mode 100644 index 7b0e3bb..0000000 --- a/SocialVoid/Errors/NetworkErrors/README.md +++ /dev/null @@ -1,12 +0,0 @@ -# NetworkErrors - -These are the catch-all errors when dealing with the network, from -finding peers, following them, posting, etc. - -| Name | Code | Hex Code | Deprecated | Versions | Description | -|-----------------|-------|----------|------------|----------|----------------------------------------------------------------------------------------| -| PeerNotFound | 12544 | 0x03100 | No | 1.0 | The requested user entity was not found in the network | -| PostNotFound | 12545 | 0x03101 | No | 1.0 | Raised when the client requested a post that isn't found | -| PostDeleted | 12546 | 0x03102 | No | 1.0 | Raised when the client requested a post that was deleted | -| AlreadyReposted | 12547 | 0x03103 | No | 1.0 | Raised when the client attempts to repost a post that has already been reposted | -| FileUploadError | 12548 | 0x03104 | No | 1.0 | Raised when there was an error while trying to upload one or more files to the network | \ No newline at end of file diff --git a/SocialVoid/Errors/README.md b/SocialVoid/Errors/README.md deleted file mode 100644 index 763c913..0000000 --- a/SocialVoid/Errors/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# Errors - -Socialvoid has it's own unique set of error codes aside from the ones -used by the standard of the RCP server. while your client should handle -standard error codes of the RCP protcol; if you are building a Socialvoid -client then it's important that your client can handle and represent these -errors returned by the Socialvoid Server. - -These errors are designed to explain what the issue is to the client or -user, in cases the client use these errors to automatically correct their -request but some errors may be caused by users as well. so it's important -that your client can understand and catch these errors accordingly. - - -## Error Codes - -Errors come in three components. - - - Name - - Code - - Message - -### Name -The name is the name of the error, it can be anything from `PeerNotFound` -to `InternalServerError`, this makes it easier for programming languages -to use a try catch statement to catch specific errors. - -### Code -The error code is an alternative way to identify the error when the -name is not available or trying to catch a wide range of specific errors. -These are usually represented in integers. - -### Message -A message explains more details about the error, while the same error -can occur for Situation A and B; Situation B may have a different reason -for the same error. This should not be used as a way to identify the error -and usually serves the purpose of troubleshooting or displaying the error -to the user. - --------------------------------------------------------------------------- - -## Error Types - -Errors are split into sections to make it more easier to manage, you can -either identify errors indivdually by their error code or by range. - -| Section | Set | Range | Description | -|-----------------------|-----|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Validation Errors | 21 | 8448 - 8703 | Errors that returns when the given parameters or data is invalid in some way or another | -| Authentication Errors | 22 | 8704 - 8979 | Errors related to authentication/session management, these errors are usually returned when there was an error while trying to authenticate or there are session errors such as the session being expired. | -| Media Errors | 23 | 8960 - 12543 | Errors related to the media on the network, errors are usually returned if your client uploads bad media files or for some reason there is an error related to the media content on the network. | -| Network Errors | 31 | 12544 - 16383 | Errors related to actions on the network, peers not being found, posts not being found, incorrect permissions, rate limits, etc. | -| Server Errors | 40 | 16384 - *(?) | Errors related to the server, unexpected errors, servers related to administrators/moderators performing administrative tasks on the server | - -## Error Codes - - - [Validation Errors](ValidationErrors.md) 8448 - 8703 - - [Authentication Errors](AuthenticationErrors.md) 8704 - 8979 - - [Media Errors](MediaErrors.md) 8960 - 12543 - - [Network Errors](NetworkErrors.md) 12544 - 16383 - - [Server Errors](ServerErrors.md) 16384 - *(?) \ No newline at end of file diff --git a/SocialVoid/Errors/ServerErrors/InternalServerErrorException.cs b/SocialVoid/Errors/ServerErrors/InternalServerErrorException.cs deleted file mode 100644 index d5fba05..0000000 --- a/SocialVoid/Errors/ServerErrors/InternalServerErrorException.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.ServerErrors -{ - /// - /// This exception will be raised when there is an unexpected error - /// while server tried to process our request. - /// Since: v0.0.0 - /// - public sealed class InternalServerErrorException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because there was an unexpected error - /// while trying to process your request. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.InternalServerError; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal InternalServerErrorException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} \ No newline at end of file diff --git a/SocialVoid/Errors/ServerErrors/README.md b/SocialVoid/Errors/ServerErrors/README.md deleted file mode 100644 index 5347eef..0000000 --- a/SocialVoid/Errors/ServerErrors/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# ServerErrors - -These errors are usually rasied as a last resort when something is wrong -with the server. - -| Name | Code | Hex Code | Deprecated | Versions | Description | -|---------------------|-------|----------|------------|----------|---------------------------------------------------------------------------------| -| InternalServerError | 16384 | 0x04000 | No | 1.0 | Raised when there was an unexpected error while trying to process your request. | \ No newline at end of file diff --git a/SocialVoid/Errors/ValidationErrors/InvalidBiographyException.cs b/SocialVoid/Errors/ValidationErrors/InvalidBiographyException.cs deleted file mode 100644 index 8c0b973..0000000 --- a/SocialVoid/Errors/ValidationErrors/InvalidBiographyException.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.ValidationErrors -{ - /// - /// This exception will be raised when the Biography is too long - /// or contains invalid characters; - /// please see the message for further details. - /// Since: v0.0.0 - /// - public sealed class InvalidBiographyException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the Biography is too long - /// or contains invalid characters; - /// please see the message for further details. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.InvalidBiography; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal InvalidBiographyException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/ValidationErrors/InvalidClientNameException.cs b/SocialVoid/Errors/ValidationErrors/InvalidClientNameException.cs deleted file mode 100644 index e6e5e41..0000000 --- a/SocialVoid/Errors/ValidationErrors/InvalidClientNameException.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.ValidationErrors -{ - /// - /// This exception will be raised when the client name contains invalid - /// characters or is too long; - /// please see the message for further details. - /// Since: v0.0.0 - /// - public sealed class InvalidClientNameException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the client name contains invalid - /// characters or is too long; - /// please see the message for further details. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.InvalidClientName; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal InvalidClientNameException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/ValidationErrors/InvalidClientPrivateHashException.cs b/SocialVoid/Errors/ValidationErrors/InvalidClientPrivateHashException.cs deleted file mode 100644 index 3381075..0000000 --- a/SocialVoid/Errors/ValidationErrors/InvalidClientPrivateHashException.cs +++ /dev/null @@ -1,86 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.ValidationErrors -{ - /// - /// This exception will be raised when the client's private hash is invalid - /// and cannot be identified as a sha256. - /// Since: v0.0.0 - /// - public sealed class InvalidClientPrivateHashException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the client's private hash is invalid - /// and cannot be identified as a sha256. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.InvalidClientPrivateHash; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of - /// . - /// Since: v0.0.0 - /// - internal InvalidClientPrivateHashException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/ValidationErrors/InvalidClientPublicHashException.cs b/SocialVoid/Errors/ValidationErrors/InvalidClientPublicHashException.cs deleted file mode 100644 index 5ec78d2..0000000 --- a/SocialVoid/Errors/ValidationErrors/InvalidClientPublicHashException.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.ValidationErrors -{ - /// - /// This exception will be raised when the client's public hash is invalid - /// and cannot be identified as a sha256. - /// Since: v0.0.0 - /// - public sealed class InvalidClientPublicHashException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the client's public hash is invalid - /// and cannot be identified as a sha256. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.InvalidClientPublicHash; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal InvalidClientPublicHashException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/ValidationErrors/InvalidFirstNameException.cs b/SocialVoid/Errors/ValidationErrors/InvalidFirstNameException.cs deleted file mode 100644 index 083b519..0000000 --- a/SocialVoid/Errors/ValidationErrors/InvalidFirstNameException.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.ValidationErrors -{ - /// - /// This exception will be raised when the First Name provided contains - /// invalid characters and or is too long; - /// please see the message for further details. - /// Since: v0.0.0 - /// - public sealed class InvalidFirstNameException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the First Name provided contains - /// invalid characters and or is too long; - /// please see the message for further details. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.InvalidFirstName; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal InvalidFirstNameException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/ValidationErrors/InvalidLastNameException.cs b/SocialVoid/Errors/ValidationErrors/InvalidLastNameException.cs deleted file mode 100644 index 2004e47..0000000 --- a/SocialVoid/Errors/ValidationErrors/InvalidLastNameException.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.ValidationErrors -{ - /// - /// This exception will be raised when the Last Name provided contains - /// invalid characters and or is too long; - /// please see the message for further details. - /// Since: v0.0.0 - /// - public sealed class InvalidLastNameException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the Last Name provided contains - /// invalid characters and or is too long; - /// please see the message for further details. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.InvalidLastName; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal InvalidLastNameException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/ValidationErrors/InvalidPasswordException.cs b/SocialVoid/Errors/ValidationErrors/InvalidPasswordException.cs deleted file mode 100644 index 02ef8b7..0000000 --- a/SocialVoid/Errors/ValidationErrors/InvalidPasswordException.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.ValidationErrors -{ - /// - /// This exception will be raised when the given password is invalid and/or - /// insecure and does not meet the specification. - /// Since: v0.0.0 - /// - public sealed class InvalidPasswordException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the given password is invalid and/or - /// insecure and does not meet the specification. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.InvalidPassword; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal InvalidPasswordException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/ValidationErrors/InvalidPeerInputException.cs b/SocialVoid/Errors/ValidationErrors/InvalidPeerInputException.cs deleted file mode 100644 index 10a4948..0000000 --- a/SocialVoid/Errors/ValidationErrors/InvalidPeerInputException.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.ValidationErrors -{ - /// - /// This exception will be raised when the client provide an invalid - /// peer identification as input. - /// Since: v0.0.0 - /// - public sealed class InvalidPeerInputException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the client provided an invalid - /// peer identification as input. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.InvalidPeerInput; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal InvalidPeerInputException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/ValidationErrors/InvalidPlatformException.cs b/SocialVoid/Errors/ValidationErrors/InvalidPlatformException.cs deleted file mode 100644 index 819851b..0000000 --- a/SocialVoid/Errors/ValidationErrors/InvalidPlatformException.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.ValidationErrors -{ - /// - /// This exception will be raised when the platform name contains invalid - /// characters or is too long; - /// please see the message for further details. - /// Since: v0.0.0 - /// - public sealed class InvalidPlatformException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the platform name contains invalid - /// characters or is too long; - /// please see the message for further details. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.InvalidPlatform; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal InvalidPlatformException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/ValidationErrors/InvalidPostTextException.cs b/SocialVoid/Errors/ValidationErrors/InvalidPostTextException.cs deleted file mode 100644 index 21656b8..0000000 --- a/SocialVoid/Errors/ValidationErrors/InvalidPostTextException.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.ValidationErrors -{ - /// - /// This exception will be raised when the post contains invalid - /// characters or is too long; - /// please see the exception message for further details. - /// Since: v0.0.0 - /// - public sealed class InvalidPostTextException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the post contains invalid characters - /// or is too long; - /// please see the message for further details. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.InvalidPostText; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal InvalidPostTextException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/ValidationErrors/InvalidSessionIdentificationException.cs b/SocialVoid/Errors/ValidationErrors/InvalidSessionIdentificationException.cs deleted file mode 100644 index 3109edc..0000000 --- a/SocialVoid/Errors/ValidationErrors/InvalidSessionIdentificationException.cs +++ /dev/null @@ -1,88 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.ValidationErrors -{ - /// - /// This exception will be raised when the session identification - /// object is invalid; - /// please see the message for further details. - /// Since: v0.0.0 - /// - public sealed class InvalidSessionIdentificationException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The - /// error code will be returned because the session identification - /// object is invalid; - /// please see the message for further details. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.InvalidSessionIdentification; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of - /// . - /// Since: v0.0.0 - /// - internal InvalidSessionIdentificationException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/ValidationErrors/InvalidUsernameException.cs b/SocialVoid/Errors/ValidationErrors/InvalidUsernameException.cs deleted file mode 100644 index 054568c..0000000 --- a/SocialVoid/Errors/ValidationErrors/InvalidUsernameException.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.ValidationErrors -{ - /// - /// This exception will be raised when the given username is invalid - /// and does not meet the specification. - /// Since: v0.0.0 - /// - public sealed class InvalidUsernameException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the given username is invalid and - /// does not meet the specifications. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.InvalidUsername; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal InvalidUsernameException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/ValidationErrors/InvalidVersionException.cs b/SocialVoid/Errors/ValidationErrors/InvalidVersionException.cs deleted file mode 100644 index 53f80c2..0000000 --- a/SocialVoid/Errors/ValidationErrors/InvalidVersionException.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.ValidationErrors -{ - /// - /// This exception will be raised when the given username is invalid - /// and does not meet the specification. - /// Since: v0.0.0 - /// - public sealed class InvalidVersionException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned because the version is invalid or is too long; - /// please see the message for further details. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.InvalidVersion; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal InvalidVersionException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} diff --git a/SocialVoid/Errors/ValidationErrors/README.md b/SocialVoid/Errors/ValidationErrors/README.md deleted file mode 100644 index 512e76f..0000000 --- a/SocialVoid/Errors/ValidationErrors/README.md +++ /dev/null @@ -1,21 +0,0 @@ -# Validation Errors - -These are errors raised when your client passes on parameters or data -that is invalid in some way or another. - -| Name | Code | Hex Code | Deprecated | Versions | Description | -|------------------------------|------|----------|------------|----------|-------------------------------------------------------------------------------------------------------------| -| InvalidUsername | 8448 | 0x02100 | No | 1.0 | The given username is invalid and does not meet the specification | -| InvalidPassword | 8449 | 0x02101 | No | 1.0 | The given password is invalid and/or insecure and does not meet the specification | -| InvalidFirstName | 8450 | 0x02102 | No | 1.0 | The First Name provided contains invalid characters and or is too long, see the message for further details | -| InvalidLastName | 8451 | 0x02103 | No | 1.0 | The Last Name provided contains invalid characters and or is too long, see the message for further details | -| InvalidBiography | 8452 | 0x02104 | No | 1.0 | The Biography is too long or contains invalid characters, see the message for further details | -| UsernameAlreadyExists | 8453 | 0x02105 | No | 1.0 | The username is already registered in the network and cannot be used | -| InvalidPeerInput | 8454 | 0x02106 | No | 1.0 | The client provided an invalid peer identification as input | -| InvalidPostText | 8455 | 0x02107 | No | 1.0 | The post contains invalid characters or is too long, see the message for further details | -| InvalidClientPublicHash | 8456 | 0x02108 | No | 1.0 | The client's public hash is invalid and cannot be identified as a sha256 | -| InvalidClientPrivateHash | 8457 | 0x02109 | No | 1.0 | The client's private hash is invalid and cannot be identified as a sha256 | -| InvalidPlatform | 8464 | 0x02110 | No | 1.0 | The platform name contains invalid characters or is too long, see the message for further details | -| InvalidVersion | 8459 | 0x0210b | No | 1.0 | The version is invalid or is too long, see the message for further details | -| InvalidClientName | 8460 | 0x0210c | No | 1.0 | The client name contains invalid characters or is too long, see the message for further details | -| InvalidSessionIdentification | 8461 | 0x0210d | No | 1.0 | The session identification object is invalid, see the message for further details | \ No newline at end of file diff --git a/SocialVoid/Errors/ValidationErrors/UsernameAlreadyExistsException.cs b/SocialVoid/Errors/ValidationErrors/UsernameAlreadyExistsException.cs deleted file mode 100644 index faba28e..0000000 --- a/SocialVoid/Errors/ValidationErrors/UsernameAlreadyExistsException.cs +++ /dev/null @@ -1,86 +0,0 @@ -/* - * This file is part of SocialVoid.NET Project (https://github.com/Intellivoid/SocialVoid.NET). - * Copyright (c) 2021 SocialVoid.NET Authors. - * - * This library is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this source code of library. - * If not, see . - */ - -namespace SocialVoid.Errors.ValidationErrors -{ - /// - /// This exception will be raised when the given username is invalid - /// and does not meet the specification. - /// Since: v0.0.0 - /// - public sealed class UsernameAlreadyExistsException : GeneralException - { - //------------------------------------------------- - #region Constant's Region - // some members here - #endregion - //------------------------------------------------- - #region static Properties Region - // some members here - #endregion - //------------------------------------------------- - #region Properties Region - /// - /// The error code - /// will be returned - /// because the given username is invalid and - /// does not meet the specifications. - /// Since: v0.0.0 - /// - public override ErrorCodes ErrorCode - { - get - { - return ErrorCodes.InvalidUsername; - } - } - #endregion - //------------------------------------------------- - #region static field's Region - // some members here - #endregion - //------------------------------------------------- - #region field's Region - // some members here - #endregion - //------------------------------------------------- - #region static event field's Region - // some members here - #endregion - //------------------------------------------------- - #region event field's Region - // some members here - #endregion - //------------------------------------------------- - #region Constructor's Region - /// - /// Creates a new instance of . - /// Since: v0.0.0 - /// - internal UsernameAlreadyExistsException(string message) : base(message) - { - ; - } - #endregion - //------------------------------------------------- - #region Destructor's Region - // some members here - #endregion - //------------------------------------------------- - } -} \ No newline at end of file diff --git a/SocialVoid/Icon.ico b/SocialVoid/Icon.ico deleted file mode 100644 index 2d4d72b..0000000 Binary files a/SocialVoid/Icon.ico and /dev/null differ diff --git a/SocialVoid/Icon.png b/SocialVoid/Icon.png deleted file mode 100644 index 7bfa7cd..0000000 Binary files a/SocialVoid/Icon.png and /dev/null differ diff --git a/SocialVoid/Methods/CreateSession.cs b/SocialVoid/Methods/CreateSession.cs deleted file mode 100644 index 496f5a7..0000000 --- a/SocialVoid/Methods/CreateSession.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace SocialVoid.Methods -{ - class CreateSession - { - public static bool Do(string public_hash, string private_hash, string platform, string version) - { - return true; - } - } -} diff --git a/SocialVoid/SocialVoid.csproj b/SocialVoid/SocialVoid.csproj deleted file mode 100644 index 0970d03..0000000 --- a/SocialVoid/SocialVoid.csproj +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - SocialVoid - SocialVoid - The official Socialvoid RPC Library written for C# - en-US - - net5.0 - SovialVoid - 0.0.1 - SocialVoid Team - https://github.com/intellivoid/Socialvoid.NET - https://github.com/intellivoid/Socialvoid.NET - https://github.com/intellivoid/Socialvoid.NET/raw/master/SocialVoid/Icon.ico - Icon.png - git - true - true - true - true - LICENSE - - - - 1701;1702;1705 - - - - - $(DefineConstants);__LINUX__ - $(DefineConstants);__WINDOWS__ - $(DefineConstants);__UAP__ - $(DefineConstants);__ANDROID__ - $(DefineConstants);__IOS__ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Tests/Errors/ErrorsTest.cs b/Tests/Errors/ErrorsTest.cs index c42e31e..94fddbc 100644 --- a/Tests/Errors/ErrorsTest.cs +++ b/Tests/Errors/ErrorsTest.cs @@ -1,8 +1,8 @@ using System; -using SocialVoid.Errors; -using SocialVoid.Errors.ServerErrors; -using SocialVoid.Errors.NetworkErrors; -using SocialVoid.Errors.ValidationErrors; +using Socialvoid.Errors; +using Socialvoid.Errors.ServerErrors; +using Socialvoid.Errors.NetworkErrors; +using Socialvoid.Errors.ValidationErrors; using NUnit.Framework; diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 0250398..8280024 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -1,7 +1,7 @@ - - + +