From c076813783b2051c6bdf20dd8862d4e322ec88ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Boh=C3=A1=C4=8Dek?= Date: Sat, 15 Jan 2022 21:56:06 +0100 Subject: [PATCH] feat: split packets definitions into separate assembly --- .../Client/BaseNostaleClient.cs | 2 - Core/NosSmooth.Core/Client/INostaleClient.cs | 2 +- Core/NosSmooth.Core/NosSmooth.Core.csproj | 3 +- Core/NosSmooth.Core/Packets/IPacketHandler.cs | 2 +- .../Packets/IPacketResponder.cs | 2 +- .../NosSmooth.Core/Packets/PacketEventArgs.cs | 2 +- Core/NosSmooth.Core/Packets/PacketHandler.cs | 4 +- .../Packets/ParsingFailedPacket.cs | 2 +- .../Converters/TypeConverterRepository.cs | 0 .../Walk/WalkPacketResponder.cs | 4 +- .../NostaleLocalClient.cs | 2 +- NosSmooth.sln | 40 +++++++++++++++++-- .../Attributes/GenerateSerializerAttribute.cs | 4 +- .../PacketConditionalIndexAttribute.cs | 2 +- .../Attributes/PacketContextListAttribute.cs | 4 +- .../Attributes/PacketGreedyIndexAttribute.cs | 2 +- .../Attributes/PacketHeaderAttribute.cs | 4 +- .../Attributes/PacketIndexAttribute.cs | 4 +- .../Attributes/PacketListIndexAttribute.cs | 4 +- .../Attributes/PacketSource.cs | 2 +- .../BaseStringConverter.cs | 4 +- .../Common/NameString.cs | 5 +-- .../Errors/CouldNotConvertError.cs | 5 +-- .../Errors/DeserializedValueNullError.cs | 3 +- .../Errors/ListSerializerError.cs | 2 +- .../Errors/PacketEndNotExpectedError.cs | 4 +- .../Errors/PacketEndReachedError.cs | 2 +- .../Errors/PacketParameterSerializerError.cs | 4 +- .../Errors/WrongTypeError.cs | 4 +- .../IStringConverter.cs | 2 +- .../IStringConverterRepository.cs | 5 +-- .../IStringSerializer.cs | 3 +- .../IsExternalInit.cs | 15 +++++++ ...mooth.PacketSerializer.Abstractions.csproj | 14 +++++++ .../PacketStringBuilder.cs | 4 +- .../PacketStringEnumerator.cs | 7 +--- .../PacketToken.cs | 3 +- .../Converters/Basic/BasicTypeConverter.cs | 1 + .../Converters/Basic/BoolStringConverter.cs | 1 + .../Converters/Basic/ByteStringConverter.cs | 1 + .../Converters/Basic/CharStringConverter.cs | 1 + .../Converters/Basic/IntStringConverter.cs | 1 + .../Converters/Basic/LongStringConverter.cs | 1 + .../Converters/Basic/ShortStringConverter.cs | 1 + .../Converters/Basic/StringTypeConverter.cs | 0 .../Converters/Basic/UIntStringConverter.cs | 1 + .../Converters/Basic/ULongStringConverter.cs | 1 + .../Converters/Basic/UShortStringConverter.cs | 1 + .../Converters/Common/NameStringConverter.cs | 3 +- .../Packets/UpgradeRareSubPacketConverter.cs | 4 +- .../Special/Converters/EnumStringConverter.cs | 1 + .../Special/Converters/ListStringConverter.cs | 2 + .../Converters/NullableStringConverter.cs | 1 + .../Special/EnumStringConverterFactory.cs | 1 + .../Special/IStringConverterFactory.cs | 1 + .../Special/ListStringConverterFactory.cs | 1 + .../Special/NullableStringConverterFactory.cs | 1 + .../Converters/Special/StringSerializer.cs | 1 + .../Converters/StringConverterRepository.cs | 1 + .../Errors/AmbiguousHeaderError.cs | 2 +- .../Errors/PacketConverterNotFoundError.cs | 0 .../Errors/PacketMissingHeaderError.cs | 0 .../Errors/TypeConverterNotFoundError.cs | 0 .../ConcurrentDictionaryExtensions.cs | 0 .../Extensions/ResultExtensions.cs | 0 .../Extensions/ServiceCollectionExtensions.cs | 5 ++- .../IPacketSerializer.cs | 2 +- .../IsExternalInit.cs | 0 .../NosCore.Packets.csproj.DotSettings | 0 .../NosSmooth.PacketSerializer.csproj | 9 +++-- .../PacketSerializer.cs | 4 +- .../Packets/IPacketTypesRepository.cs | 2 +- .../Packets/PacketInfo.cs | 1 + .../Packets/PacketTypesRepository.cs | 3 +- .../IParameterGenerator.cs | 0 ...acketConditionalIndexAttributeGenerator.cs | 2 +- .../PacketContextListAttributeGenerator.cs | 6 ++- .../PacketGreedyIndexAttributeGenerator.cs | 6 ++- .../PacketIndexAttributeGenerator.cs | 3 +- .../PacketListIndexAttributeGenerator.cs | 6 ++- .../Constants.cs | 4 +- .../ConverterDeserializationGenerator.cs | 0 .../ConverterSerializationGenerator.cs | 0 .../Data/AttributeInfo.cs | 0 .../Data/PacketInfo.cs | 0 .../Data/ParameterInfo.cs | 0 .../Data/Parameters.cs | 0 .../Errors/DiagnosticError.cs | 0 .../Errors/IError.cs | 0 .../AttributeArgumentSyntaxExtensions.cs | 0 .../Extensions/AttributeInfoExtensions.cs | 0 .../AttributeListSyntaxExtensions.cs | 1 + .../IndentedTextWriterExtensions.cs | 0 .../Extensions/ParameterInfoExtensions.cs | 0 .../Extensions/SyntaxNodeExtensions.cs | 0 .../Extensions/TypeSymbolExtensions.cs | 0 .../Extensions/TypeSyntaxExtensions.cs | 0 .../BasicInlineConverterGenerator.cs | 0 .../BoolInlineConverterGenerator.cs | 0 .../EnumInlineConverterGenerator.cs | 0 .../FallbackInlineConverterGenerator.cs | 0 .../IInlineConverterGenerator.cs | 0 .../ListInlineConverterGenerator.cs | 0 .../StringInlineConverterGenerator.cs | 0 .../InlineTypeConverterGenerator.cs | 0 .../IsExternalInit.cs | 0 ...osSmooth.PacketSerializersGenerator.csproj | 0 .../PacketConverterGenerator.cs | 5 +-- .../ParameterChecker.cs | 0 .../SourceGenerator.cs | 7 ++-- .../Client/Battle/NcifPacket.cs | 4 +- .../Client/Battle/UseAOESkillPacket.cs | 4 +- .../Client/Battle/UseSkillPacket.cs | 4 +- .../Client/Chat/SayPacket.cs | 4 +- .../Client/Misc/PulsePacket.cs | 4 +- .../Client/Movement/WalkPacket.cs | 4 +- .../NosSmooth.Packets/Enums/Act4Mode.cs | 0 .../Enums/Chat/MessageType.cs | 0 .../NosSmooth.Packets/Enums/Chat/SayColor.cs | 0 .../NosSmooth.Packets/Enums/Element.cs | 0 .../Enums/Entities/EntityType.cs | 0 .../Enums/Entities/FactionType.cs | 0 .../Enums/Entities/SpawnEffect.cs | 0 .../Enums/Players/AuthorityType.cs | 0 .../Enums/Players/HairColor.cs | 0 .../Enums/Players/HairStyle.cs | 0 .../Enums/Players/PlayerClass.cs | 0 .../Enums/Players/SexType.cs | 0 .../NosSmooth.Packets}/IPacket.cs | 2 +- Packets/NosSmooth.Packets/IsExternalInit.cs | 15 +++++++ .../NosSmooth.Packets.csproj | 17 ++++++++ .../Server/Act4/FcPacket.cs | 4 +- .../Server/Act4/FcSubPacket.cs | 4 +- .../Server/Chat/MsgPacket.cs | 4 +- .../Server/Chat/SayPacket.cs | 4 +- .../Server/Entities/InEquipmentSubPacket.cs | 4 +- .../Server/Entities/InItemSubPacket.cs | 4 +- .../Server/Entities/InNonPlayerSubPacket.cs | 6 +-- .../Server/Entities/InPacket.cs | 6 +-- .../Server/Entities/InPlayerSubPacket.cs | 9 ++--- .../Server/Entities/MovePacket.cs | 4 +- .../Server/Entities/StPacket.cs | 5 +-- .../Server/Entities/StatPacket.cs | 4 +- .../Server/Groups/PinitPacket.cs | 5 +-- .../Server/Groups/PinitSubPacket.cs | 6 +-- .../Server/Maps/CMapPacket.cs | 4 +- .../Server/Players/CInfoPacket.cs | 4 +- .../Server/Players/CModePacket.cs | 4 +- .../Server/Players/FamilySubPacket.cs | 4 +- .../Server/Players/LevPacket.cs | 4 +- .../Server/Skills/SkiPacket.cs | 6 +-- .../Server/Skills/SkiSubPacket.cs | 4 +- .../Server/Skills/SrPacket.cs | 5 +-- .../Server/Weapons/UpgradeRareSubPacket.cs | 4 +- .../NosSmooth.Packets}/UnresolvedPacket.cs | 2 +- .../Packets/FcPacketConverterTests.cs | 5 +-- .../Packets/InPacketConverterTests.cs | 17 ++++---- .../Packets/MovePacketConverterTests.cs | 5 +-- .../Packets/PinitPacketConverterTest.cs | 5 +-- .../NosSmooth.Packets.Tests.csproj | 2 +- .../PacketStringBuilderTests.cs | 1 + .../PacketStringEnumeratorTests.cs | 5 +-- 162 files changed, 280 insertions(+), 200 deletions(-) delete mode 100644 Core/NosSmooth.Packets/Converters/TypeConverterRepository.cs rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer.Abstractions}/Attributes/GenerateSerializerAttribute.cs (94%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer.Abstractions}/Attributes/PacketConditionalIndexAttribute.cs (94%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer.Abstractions}/Attributes/PacketContextListAttribute.cs (94%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer.Abstractions}/Attributes/PacketGreedyIndexAttribute.cs (91%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer.Abstractions}/Attributes/PacketHeaderAttribute.cs (94%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer.Abstractions}/Attributes/PacketIndexAttribute.cs (96%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer.Abstractions}/Attributes/PacketListIndexAttribute.cs (93%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer.Abstractions}/Attributes/PacketSource.cs (88%) rename {Core/NosSmooth.Packets/Converters => Packets/NosSmooth.PacketSerializer.Abstractions}/BaseStringConverter.cs (93%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer.Abstractions}/Common/NameString.cs (96%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer.Abstractions}/Errors/CouldNotConvertError.cs (86%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer.Abstractions}/Errors/DeserializedValueNullError.cs (88%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer.Abstractions}/Errors/ListSerializerError.cs (90%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer.Abstractions}/Errors/PacketEndNotExpectedError.cs (87%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer.Abstractions}/Errors/PacketEndReachedError.cs (91%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer.Abstractions}/Errors/PacketParameterSerializerError.cs (91%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer.Abstractions}/Errors/WrongTypeError.cs (90%) rename {Core/NosSmooth.Packets/Converters => Packets/NosSmooth.PacketSerializer.Abstractions}/IStringConverter.cs (97%) rename {Core/NosSmooth.Packets/Converters => Packets/NosSmooth.PacketSerializer.Abstractions}/IStringConverterRepository.cs (87%) rename {Core/NosSmooth.Packets/Converters => Packets/NosSmooth.PacketSerializer.Abstractions}/IStringSerializer.cs (97%) create mode 100644 Packets/NosSmooth.PacketSerializer.Abstractions/IsExternalInit.cs create mode 100644 Packets/NosSmooth.PacketSerializer.Abstractions/NosSmooth.PacketSerializer.Abstractions.csproj rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer.Abstractions}/PacketStringBuilder.cs (99%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer.Abstractions}/PacketStringEnumerator.cs (98%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer.Abstractions}/PacketToken.cs (97%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Converters/Basic/BasicTypeConverter.cs (97%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Converters/Basic/BoolStringConverter.cs (95%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Converters/Basic/ByteStringConverter.cs (93%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Converters/Basic/CharStringConverter.cs (93%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Converters/Basic/IntStringConverter.cs (93%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Converters/Basic/LongStringConverter.cs (93%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Converters/Basic/ShortStringConverter.cs (93%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Converters/Basic/StringTypeConverter.cs (100%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Converters/Basic/UIntStringConverter.cs (93%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Converters/Basic/ULongStringConverter.cs (93%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Converters/Basic/UShortStringConverter.cs (93%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Converters/Common/NameStringConverter.cs (92%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Converters/Packets/UpgradeRareSubPacketConverter.cs (93%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Converters/Special/Converters/EnumStringConverter.cs (97%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Converters/Special/Converters/ListStringConverter.cs (96%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Converters/Special/Converters/NullableStringConverter.cs (97%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Converters/Special/EnumStringConverterFactory.cs (97%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Converters/Special/IStringConverterFactory.cs (96%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Converters/Special/ListStringConverterFactory.cs (97%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Converters/Special/NullableStringConverterFactory.cs (97%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Converters/Special/StringSerializer.cs (98%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Converters/StringConverterRepository.cs (98%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Errors/AmbiguousHeaderError.cs (94%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Errors/PacketConverterNotFoundError.cs (100%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Errors/PacketMissingHeaderError.cs (100%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Errors/TypeConverterNotFoundError.cs (100%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Extensions/ConcurrentDictionaryExtensions.cs (100%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Extensions/ResultExtensions.cs (100%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Extensions/ServiceCollectionExtensions.cs (97%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/IPacketSerializer.cs (95%) rename {Core/NosSmooth.PacketSerializersGenerator => Packets/NosSmooth.PacketSerializer}/IsExternalInit.cs (100%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/NosCore.Packets.csproj.DotSettings (100%) rename Core/NosSmooth.Packets/NosSmooth.Packets.csproj => Packets/NosSmooth.PacketSerializer/NosSmooth.PacketSerializer.csproj (56%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/PacketSerializer.cs (94%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Packets/IPacketTypesRepository.cs (97%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Packets/PacketInfo.cs (92%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializer}/Packets/PacketTypesRepository.cs (98%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/AttributeGenerators/IParameterGenerator.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketConditionalIndexAttributeGenerator.cs (99%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketContextListAttributeGenerator.cs (94%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketGreedyIndexAttributeGenerator.cs (92%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketIndexAttributeGenerator.cs (97%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketListIndexAttributeGenerator.cs (94%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/Constants.cs (86%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/ConverterDeserializationGenerator.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/ConverterSerializationGenerator.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/Data/AttributeInfo.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/Data/PacketInfo.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/Data/ParameterInfo.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/Data/Parameters.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/Errors/DiagnosticError.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/Errors/IError.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/Extensions/AttributeArgumentSyntaxExtensions.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/Extensions/AttributeInfoExtensions.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/Extensions/AttributeListSyntaxExtensions.cs (92%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/Extensions/IndentedTextWriterExtensions.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/Extensions/ParameterInfoExtensions.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/Extensions/SyntaxNodeExtensions.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/Extensions/TypeSymbolExtensions.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/Extensions/TypeSyntaxExtensions.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/BasicInlineConverterGenerator.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/BoolInlineConverterGenerator.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/EnumInlineConverterGenerator.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/FallbackInlineConverterGenerator.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/IInlineConverterGenerator.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/ListInlineConverterGenerator.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/StringInlineConverterGenerator.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/InlineTypeConverterGenerator.cs (100%) rename {Core/NosSmooth.Packets => Packets/NosSmooth.PacketSerializersGenerator}/IsExternalInit.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/NosSmooth.PacketSerializersGenerator.csproj (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/PacketConverterGenerator.cs (98%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/ParameterChecker.cs (100%) rename {Core => Packets}/NosSmooth.PacketSerializersGenerator/SourceGenerator.cs (98%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Client/Battle/NcifPacket.cs (87%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Client/Battle/UseAOESkillPacket.cs (87%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Client/Battle/UseSkillPacket.cs (87%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Client/Chat/SayPacket.cs (82%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Client/Misc/PulsePacket.cs (87%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Client/Movement/WalkPacket.cs (90%) rename {Core => Packets}/NosSmooth.Packets/Enums/Act4Mode.cs (100%) rename {Core => Packets}/NosSmooth.Packets/Enums/Chat/MessageType.cs (100%) rename {Core => Packets}/NosSmooth.Packets/Enums/Chat/SayColor.cs (100%) rename {Core => Packets}/NosSmooth.Packets/Enums/Element.cs (100%) rename {Core => Packets}/NosSmooth.Packets/Enums/Entities/EntityType.cs (100%) rename {Core => Packets}/NosSmooth.Packets/Enums/Entities/FactionType.cs (100%) rename {Core => Packets}/NosSmooth.Packets/Enums/Entities/SpawnEffect.cs (100%) rename {Core => Packets}/NosSmooth.Packets/Enums/Players/AuthorityType.cs (100%) rename {Core => Packets}/NosSmooth.Packets/Enums/Players/HairColor.cs (100%) rename {Core => Packets}/NosSmooth.Packets/Enums/Players/HairStyle.cs (100%) rename {Core => Packets}/NosSmooth.Packets/Enums/Players/PlayerClass.cs (100%) rename {Core => Packets}/NosSmooth.Packets/Enums/Players/SexType.cs (100%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/IPacket.cs (89%) create mode 100644 Packets/NosSmooth.Packets/IsExternalInit.cs create mode 100644 Packets/NosSmooth.Packets/NosSmooth.Packets.csproj rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Server/Act4/FcPacket.cs (92%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Server/Act4/FcSubPacket.cs (93%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Server/Chat/MsgPacket.cs (86%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Server/Chat/SayPacket.cs (89%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Server/Entities/InEquipmentSubPacket.cs (93%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Server/Entities/InItemSubPacket.cs (88%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Server/Entities/InNonPlayerSubPacket.cs (94%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Server/Entities/InPacket.cs (93%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Server/Entities/InPlayerSubPacket.cs (95%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Server/Entities/MovePacket.cs (90%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Server/Entities/StPacket.cs (91%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Server/Entities/StatPacket.cs (89%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Server/Groups/PinitPacket.cs (86%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Server/Groups/PinitSubPacket.cs (92%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Server/Maps/CMapPacket.cs (86%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Server/Players/CInfoPacket.cs (78%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Server/Players/CModePacket.cs (92%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Server/Players/FamilySubPacket.cs (85%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Server/Players/LevPacket.cs (93%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Server/Skills/SkiPacket.cs (85%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Server/Skills/SkiSubPacket.cs (85%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Server/Skills/SrPacket.cs (85%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/Server/Weapons/UpgradeRareSubPacket.cs (83%) rename {Core/NosSmooth.Packets/Packets => Packets/NosSmooth.Packets}/UnresolvedPacket.cs (92%) diff --git a/Core/NosSmooth.Core/Client/BaseNostaleClient.cs b/Core/NosSmooth.Core/Client/BaseNostaleClient.cs index 7a43eb6aa21da403139461ee15152b7b8c9a83a3..dac1939a4d68689ada8db0c6b5ee0cb311c91119 100644 --- a/Core/NosSmooth.Core/Client/BaseNostaleClient.cs +++ b/Core/NosSmooth.Core/Client/BaseNostaleClient.cs @@ -7,9 +7,7 @@ using System.Threading; using System.Threading.Tasks; using NosSmooth.Core.Commands; -using NosSmooth.Core.Packets; using NosSmooth.Packets; -using NosSmooth.Packets.Packets; using Remora.Results; namespace NosSmooth.Core.Client; diff --git a/Core/NosSmooth.Core/Client/INostaleClient.cs b/Core/NosSmooth.Core/Client/INostaleClient.cs index 8952f1c7985f0bfda5b8a6a45a65c348ef9f6cbd..ee3a68d73729af6bd6cba0112a6cfdb4bc522397 100644 --- a/Core/NosSmooth.Core/Client/INostaleClient.cs +++ b/Core/NosSmooth.Core/Client/INostaleClient.cs @@ -7,7 +7,7 @@ using System.Threading; using System.Threading.Tasks; using NosSmooth.Core.Commands; -using NosSmooth.Packets.Packets; +using NosSmooth.Packets; using Remora.Results; namespace NosSmooth.Core.Client; diff --git a/Core/NosSmooth.Core/NosSmooth.Core.csproj b/Core/NosSmooth.Core/NosSmooth.Core.csproj index d7dc5a5da6201f73970a09c4c1edaa189108e2f9..627b4e7238b6e9d2f27ed23c157e5d25869b5c66 100644 --- a/Core/NosSmooth.Core/NosSmooth.Core.csproj +++ b/Core/NosSmooth.Core/NosSmooth.Core.csproj @@ -12,7 +12,8 @@ - + + diff --git a/Core/NosSmooth.Core/Packets/IPacketHandler.cs b/Core/NosSmooth.Core/Packets/IPacketHandler.cs index ce7bf1506650ceccf21716cc605ae954658a2f85..5c689b9f4fc4952c1d78eb172120c686db79fba1 100644 --- a/Core/NosSmooth.Core/Packets/IPacketHandler.cs +++ b/Core/NosSmooth.Core/Packets/IPacketHandler.cs @@ -6,7 +6,7 @@ using System.Threading; using System.Threading.Tasks; -using NosSmooth.Packets.Packets; +using NosSmooth.Packets; using Remora.Results; namespace NosSmooth.Core.Packets; diff --git a/Core/NosSmooth.Core/Packets/IPacketResponder.cs b/Core/NosSmooth.Core/Packets/IPacketResponder.cs index 1dad828b1a1d55b9a15668226cf8b2290038670c..bb04d697fd77175385fae00188b99300d267d808 100644 --- a/Core/NosSmooth.Core/Packets/IPacketResponder.cs +++ b/Core/NosSmooth.Core/Packets/IPacketResponder.cs @@ -6,7 +6,7 @@ using System.Threading; using System.Threading.Tasks; -using NosSmooth.Packets.Packets; +using NosSmooth.Packets; using Remora.Results; namespace NosSmooth.Core.Packets; diff --git a/Core/NosSmooth.Core/Packets/PacketEventArgs.cs b/Core/NosSmooth.Core/Packets/PacketEventArgs.cs index 02f35f1f49f7e9709ef27c8e8734ffe708a0250e..2020324e0bc79659a2859e5c71c9e120f56f5a56 100644 --- a/Core/NosSmooth.Core/Packets/PacketEventArgs.cs +++ b/Core/NosSmooth.Core/Packets/PacketEventArgs.cs @@ -4,7 +4,7 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; +using NosSmooth.PacketSerializer.Abstractions.Attributes; namespace NosSmooth.Core.Packets; diff --git a/Core/NosSmooth.Core/Packets/PacketHandler.cs b/Core/NosSmooth.Core/Packets/PacketHandler.cs index 0a0b3f08883520a5b9e712989d520fb39cefbfbb..56e91eaf315db99308669506815642a106815b75 100644 --- a/Core/NosSmooth.Core/Packets/PacketHandler.cs +++ b/Core/NosSmooth.Core/Packets/PacketHandler.cs @@ -11,8 +11,8 @@ using System.Reflection; using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.DependencyInjection; -using NosSmooth.Packets.Attributes; -using NosSmooth.Packets.Packets; +using NosSmooth.Packets; +using NosSmooth.PacketSerializer.Abstractions.Attributes; using Remora.Results; namespace NosSmooth.Core.Packets; diff --git a/Core/NosSmooth.Core/Packets/ParsingFailedPacket.cs b/Core/NosSmooth.Core/Packets/ParsingFailedPacket.cs index 2e93b55d633bb09aaed8aca603d1fcbe64c0300e..5fd9ca0e17e7d8a7b749c5d43c175d4078c54588 100644 --- a/Core/NosSmooth.Core/Packets/ParsingFailedPacket.cs +++ b/Core/NosSmooth.Core/Packets/ParsingFailedPacket.cs @@ -4,7 +4,7 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Packets; +using NosSmooth.Packets; using Remora.Results; namespace NosSmooth.Core.Packets; diff --git a/Core/NosSmooth.Packets/Converters/TypeConverterRepository.cs b/Core/NosSmooth.Packets/Converters/TypeConverterRepository.cs deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/Local/NosSmooth.LocalClient/CommandHandlers/Walk/WalkPacketResponder.cs b/Local/NosSmooth.LocalClient/CommandHandlers/Walk/WalkPacketResponder.cs index 375124eac2e494c67cd96507dcb7767c2eacae53..71ccb148c64f4356e91b1144b0eea5346d73708b 100644 --- a/Local/NosSmooth.LocalClient/CommandHandlers/Walk/WalkPacketResponder.cs +++ b/Local/NosSmooth.LocalClient/CommandHandlers/Walk/WalkPacketResponder.cs @@ -6,8 +6,8 @@ using NosSmooth.Core.Commands; using NosSmooth.Core.Packets; -using NosSmooth.Packets.Packets.Client.Movement; -using NosSmooth.Packets.Packets.Server.Maps; +using NosSmooth.Packets.Client.Movement; +using NosSmooth.Packets.Server.Maps; using Remora.Results; namespace NosSmooth.LocalClient.CommandHandlers.Walk; diff --git a/Local/NosSmooth.LocalClient/NostaleLocalClient.cs b/Local/NosSmooth.LocalClient/NostaleLocalClient.cs index 93b7b3de79e217677cf6c08099fd4df8e665fdf0..c6178e43ce81991add2fa6fcae82c7d39da3e406 100644 --- a/Local/NosSmooth.LocalClient/NostaleLocalClient.cs +++ b/Local/NosSmooth.LocalClient/NostaleLocalClient.cs @@ -13,8 +13,8 @@ using NosSmooth.Core.Extensions; using NosSmooth.Core.Packets; using NosSmooth.LocalBinding.Objects; using NosSmooth.Packets; -using NosSmooth.Packets.Attributes; using NosSmooth.Packets.Errors; +using NosSmooth.PacketSerializer.Abstractions.Attributes; using Remora.Results; namespace NosSmooth.LocalClient; diff --git a/NosSmooth.sln b/NosSmooth.sln index 08e8f56349162510be70922bb14f3e1ef817f7d3..c7b05f4c4846c520a5dedc87e6f7396ae80f97ca 100644 --- a/NosSmooth.sln +++ b/NosSmooth.sln @@ -42,9 +42,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WalkCommands", "Samples\Wal EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NosSmooth.Core.Tests", "Tests\NosSmooth.Core.Tests\NosSmooth.Core.Tests.csproj", "{1A10C624-48E5-425D-938E-31A4CC7AC687}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NosSmooth.Packets", "Core\NosSmooth.Packets\NosSmooth.Packets.csproj", "{C4DAFD83-C6DC-4597-AA1F-BA2F3ABB612C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NosSmooth.Packets", "Packets\NosSmooth.PacketSerializer\NosSmooth.PacketSerializer.csproj", "{C4DAFD83-C6DC-4597-AA1F-BA2F3ABB612C}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NosSmooth.PacketSerializersGenerator", "Core\NosSmooth.PacketSerializersGenerator\NosSmooth.PacketSerializersGenerator.csproj", "{C61EBDB6-053C-48C3-B896-58642639C93F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NosSmooth.PacketSerializersGenerator", "Packets\NosSmooth.PacketSerializersGenerator\NosSmooth.PacketSerializersGenerator.csproj", "{C61EBDB6-053C-48C3-B896-58642639C93F}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NosSmooth.Packets.Tests", "Tests\NosSmooth.Packets.Tests\NosSmooth.Packets.Tests.csproj", "{9BC56B40-64E3-4A8F-AD49-C52857A35026}" EndProject @@ -56,6 +56,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NosSmooth.Injector", "Local EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NosSmooth.LocalBinding", "Local\NosSmooth.LocalBinding\NosSmooth.LocalBinding.csproj", "{BC0DCD32-E917-4187-8CF3-970D17301ED3}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Packets", "Packets", "{54A49AC2-55B3-4156-8023-41C56719EBB5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NosSmooth.Packets", "Packets\NosSmooth.Packets\NosSmooth.Packets.csproj", "{86B4ED0C-CD28-4C6C-B58E-B4B1F7AAD683}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NosSmooth.PacketSerializer.Abstractions", "Packets\NosSmooth.PacketSerializer.Abstractions\NosSmooth.PacketSerializer.Abstractions.csproj", "{CF03BCEA-EB5B-427F-8576-7DA7EB869BDC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -282,6 +288,30 @@ Global {BC0DCD32-E917-4187-8CF3-970D17301ED3}.Release|x64.Build.0 = Release|Any CPU {BC0DCD32-E917-4187-8CF3-970D17301ED3}.Release|x86.ActiveCfg = Release|Any CPU {BC0DCD32-E917-4187-8CF3-970D17301ED3}.Release|x86.Build.0 = Release|Any CPU + {86B4ED0C-CD28-4C6C-B58E-B4B1F7AAD683}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {86B4ED0C-CD28-4C6C-B58E-B4B1F7AAD683}.Debug|Any CPU.Build.0 = Debug|Any CPU + {86B4ED0C-CD28-4C6C-B58E-B4B1F7AAD683}.Debug|x64.ActiveCfg = Debug|Any CPU + {86B4ED0C-CD28-4C6C-B58E-B4B1F7AAD683}.Debug|x64.Build.0 = Debug|Any CPU + {86B4ED0C-CD28-4C6C-B58E-B4B1F7AAD683}.Debug|x86.ActiveCfg = Debug|Any CPU + {86B4ED0C-CD28-4C6C-B58E-B4B1F7AAD683}.Debug|x86.Build.0 = Debug|Any CPU + {86B4ED0C-CD28-4C6C-B58E-B4B1F7AAD683}.Release|Any CPU.ActiveCfg = Release|Any CPU + {86B4ED0C-CD28-4C6C-B58E-B4B1F7AAD683}.Release|Any CPU.Build.0 = Release|Any CPU + {86B4ED0C-CD28-4C6C-B58E-B4B1F7AAD683}.Release|x64.ActiveCfg = Release|Any CPU + {86B4ED0C-CD28-4C6C-B58E-B4B1F7AAD683}.Release|x64.Build.0 = Release|Any CPU + {86B4ED0C-CD28-4C6C-B58E-B4B1F7AAD683}.Release|x86.ActiveCfg = Release|Any CPU + {86B4ED0C-CD28-4C6C-B58E-B4B1F7AAD683}.Release|x86.Build.0 = Release|Any CPU + {CF03BCEA-EB5B-427F-8576-7DA7EB869BDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CF03BCEA-EB5B-427F-8576-7DA7EB869BDC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CF03BCEA-EB5B-427F-8576-7DA7EB869BDC}.Debug|x64.ActiveCfg = Debug|Any CPU + {CF03BCEA-EB5B-427F-8576-7DA7EB869BDC}.Debug|x64.Build.0 = Debug|Any CPU + {CF03BCEA-EB5B-427F-8576-7DA7EB869BDC}.Debug|x86.ActiveCfg = Debug|Any CPU + {CF03BCEA-EB5B-427F-8576-7DA7EB869BDC}.Debug|x86.Build.0 = Debug|Any CPU + {CF03BCEA-EB5B-427F-8576-7DA7EB869BDC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CF03BCEA-EB5B-427F-8576-7DA7EB869BDC}.Release|Any CPU.Build.0 = Release|Any CPU + {CF03BCEA-EB5B-427F-8576-7DA7EB869BDC}.Release|x64.ActiveCfg = Release|Any CPU + {CF03BCEA-EB5B-427F-8576-7DA7EB869BDC}.Release|x64.Build.0 = Release|Any CPU + {CF03BCEA-EB5B-427F-8576-7DA7EB869BDC}.Release|x86.ActiveCfg = Release|Any CPU + {CF03BCEA-EB5B-427F-8576-7DA7EB869BDC}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -297,14 +327,16 @@ Global {F96F3AA0-131E-4B6B-AB21-BBE2DEBCEF3A} = {9025731C-084E-4E82-8CD4-0F52D3AA1F54} {9025731C-084E-4E82-8CD4-0F52D3AA1F54} = {F20FE754-FDEA-4F3A-93D4-0750CB9EBB33} {1A10C624-48E5-425D-938E-31A4CC7AC687} = {C6A8760D-92CB-4307-88A7-36CCAEBA4AD1} - {C4DAFD83-C6DC-4597-AA1F-BA2F3ABB612C} = {01B5E872-271F-4D30-A1AA-AD48D81840C5} - {C61EBDB6-053C-48C3-B896-58642639C93F} = {01B5E872-271F-4D30-A1AA-AD48D81840C5} {9BC56B40-64E3-4A8F-AD49-C52857A35026} = {C6A8760D-92CB-4307-88A7-36CCAEBA4AD1} {CA2873D8-BD0B-4583-818D-B94A3C2ABBA3} = {6078AE6E-7CD0-48E4-84E0-EB164D8881DA} {5D351C91-C631-40F6-82D2-F8D68468B076} = {6078AE6E-7CD0-48E4-84E0-EB164D8881DA} {7B68DE7D-159B-42A7-8CF8-69F156CD04DE} = {6078AE6E-7CD0-48E4-84E0-EB164D8881DA} {18A62EF6-ADDA-4224-90AB-2D5DCFC95D3E} = {F20FE754-FDEA-4F3A-93D4-0750CB9EBB33} {BC0DCD32-E917-4187-8CF3-970D17301ED3} = {6078AE6E-7CD0-48E4-84E0-EB164D8881DA} + {C61EBDB6-053C-48C3-B896-58642639C93F} = {54A49AC2-55B3-4156-8023-41C56719EBB5} + {C4DAFD83-C6DC-4597-AA1F-BA2F3ABB612C} = {54A49AC2-55B3-4156-8023-41C56719EBB5} + {86B4ED0C-CD28-4C6C-B58E-B4B1F7AAD683} = {54A49AC2-55B3-4156-8023-41C56719EBB5} + {CF03BCEA-EB5B-427F-8576-7DA7EB869BDC} = {54A49AC2-55B3-4156-8023-41C56719EBB5} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C5F46653-4DEC-429B-8580-4ED18ED9B4CA} diff --git a/Core/NosSmooth.Packets/Attributes/GenerateSerializerAttribute.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/GenerateSerializerAttribute.cs similarity index 94% rename from Core/NosSmooth.Packets/Attributes/GenerateSerializerAttribute.cs rename to Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/GenerateSerializerAttribute.cs index 442c4c25edfd2fb5fc223dbef423354c85d170d9..af64ba33601bcece17264d21021a0e7de5159fbb 100644 --- a/Core/NosSmooth.Packets/Attributes/GenerateSerializerAttribute.cs +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/GenerateSerializerAttribute.cs @@ -4,9 +4,7 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; - -namespace NosSmooth.Packets.Attributes; +namespace NosSmooth.PacketSerializer.Abstractions.Attributes; /// /// Attribute for marking packets that should have their generator generated using Roslyn code generator. diff --git a/Core/NosSmooth.Packets/Attributes/PacketConditionalIndexAttribute.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/PacketConditionalIndexAttribute.cs similarity index 94% rename from Core/NosSmooth.Packets/Attributes/PacketConditionalIndexAttribute.cs rename to Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/PacketConditionalIndexAttribute.cs index 1bb41d7a1cad56f2b6e8400f729401b5af0db2ef..99e5a63af1a5070a8854671e06406e2d5695108a 100644 --- a/Core/NosSmooth.Packets/Attributes/PacketConditionalIndexAttribute.cs +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/PacketConditionalIndexAttribute.cs @@ -4,7 +4,7 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace NosSmooth.Packets.Attributes; +namespace NosSmooth.PacketSerializer.Abstractions.Attributes; /// /// Attribute for marking packet properties that may appear only in specific conditions. diff --git a/Core/NosSmooth.Packets/Attributes/PacketContextListAttribute.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/PacketContextListAttribute.cs similarity index 94% rename from Core/NosSmooth.Packets/Attributes/PacketContextListAttribute.cs rename to Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/PacketContextListAttribute.cs index 9b997e9a08df4f1db76f0ba614957feacd39d9d5..6fe452c31968711d21b49f92d4607789cd0f3a27 100644 --- a/Core/NosSmooth.Packets/Attributes/PacketContextListAttribute.cs +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/PacketContextListAttribute.cs @@ -4,9 +4,7 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; - -namespace NosSmooth.Packets.Attributes; +namespace NosSmooth.PacketSerializer.Abstractions.Attributes; /// /// Attribute for marking properties as a contextual list. diff --git a/Core/NosSmooth.Packets/Attributes/PacketGreedyIndexAttribute.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/PacketGreedyIndexAttribute.cs similarity index 91% rename from Core/NosSmooth.Packets/Attributes/PacketGreedyIndexAttribute.cs rename to Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/PacketGreedyIndexAttribute.cs index 7bb0f2aa5948ca3a18d0d4765e19273ea49d2f75..d8ab71d3b319aa6e0c470317637bf9e7a475ee65 100644 --- a/Core/NosSmooth.Packets/Attributes/PacketGreedyIndexAttribute.cs +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/PacketGreedyIndexAttribute.cs @@ -4,7 +4,7 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace NosSmooth.Packets.Attributes; +namespace NosSmooth.PacketSerializer.Abstractions.Attributes; /// /// Attribute for marking packet parameters greedy (read to the last token). diff --git a/Core/NosSmooth.Packets/Attributes/PacketHeaderAttribute.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/PacketHeaderAttribute.cs similarity index 94% rename from Core/NosSmooth.Packets/Attributes/PacketHeaderAttribute.cs rename to Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/PacketHeaderAttribute.cs index 095be470b82ed95d67daab10859924b5500682f3..bcb3cc603bf4bcaad2504dfe5b0ee6d8dc0b53cd 100644 --- a/Core/NosSmooth.Packets/Attributes/PacketHeaderAttribute.cs +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/PacketHeaderAttribute.cs @@ -4,9 +4,7 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; - -namespace NosSmooth.Packets.Attributes; +namespace NosSmooth.PacketSerializer.Abstractions.Attributes; /// /// Attribute for specifying the header identifier of the packet. diff --git a/Core/NosSmooth.Packets/Attributes/PacketIndexAttribute.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/PacketIndexAttribute.cs similarity index 96% rename from Core/NosSmooth.Packets/Attributes/PacketIndexAttribute.cs rename to Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/PacketIndexAttribute.cs index a75c788efd67392a794cb39aed1bd2c06e3f09b4..1c40fc8911403b882d2f4946200ba6d3ab44c29c 100644 --- a/Core/NosSmooth.Packets/Attributes/PacketIndexAttribute.cs +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/PacketIndexAttribute.cs @@ -4,9 +4,7 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; - -namespace NosSmooth.Packets.Attributes; +namespace NosSmooth.PacketSerializer.Abstractions.Attributes; /// /// Attribute for marking properties in packets with their position in the packet. diff --git a/Core/NosSmooth.Packets/Attributes/PacketListIndexAttribute.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/PacketListIndexAttribute.cs similarity index 93% rename from Core/NosSmooth.Packets/Attributes/PacketListIndexAttribute.cs rename to Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/PacketListIndexAttribute.cs index 37c98ea81e9925eb53b6d26acbbcac24c4815251..38fa79a24c593935971d7015f1b91c06937e3916 100644 --- a/Core/NosSmooth.Packets/Attributes/PacketListIndexAttribute.cs +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/PacketListIndexAttribute.cs @@ -4,9 +4,7 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; - -namespace NosSmooth.Packets.Attributes; +namespace NosSmooth.PacketSerializer.Abstractions.Attributes; /// /// Attribute for marking property as a packet list. diff --git a/Core/NosSmooth.Packets/Attributes/PacketSource.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/PacketSource.cs similarity index 88% rename from Core/NosSmooth.Packets/Attributes/PacketSource.cs rename to Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/PacketSource.cs index 3a924ae4e3091b824e4e07912b75398edda27941..38343b7c93ebb263187337bc4042fc7de536f737 100644 --- a/Core/NosSmooth.Packets/Attributes/PacketSource.cs +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/Attributes/PacketSource.cs @@ -4,7 +4,7 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace NosSmooth.Packets.Attributes; +namespace NosSmooth.PacketSerializer.Abstractions.Attributes; /// /// Specifies the source of the packet. diff --git a/Core/NosSmooth.Packets/Converters/BaseStringConverter.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/BaseStringConverter.cs similarity index 93% rename from Core/NosSmooth.Packets/Converters/BaseStringConverter.cs rename to Packets/NosSmooth.PacketSerializer.Abstractions/BaseStringConverter.cs index 3d31147612300f6534c5e34b1336dbe2ebeca63b..2d48f6209d48b293835c9a9b3519d76d7daf342a 100644 --- a/Core/NosSmooth.Packets/Converters/BaseStringConverter.cs +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/BaseStringConverter.cs @@ -4,10 +4,10 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Errors; +using NosSmooth.PacketSerializer.Abstractions.Errors; using Remora.Results; -namespace NosSmooth.Packets.Converters; +namespace NosSmooth.PacketSerializer.Abstractions; /// /// Base type for converting objects that maps object converting methods to the actual type. diff --git a/Core/NosSmooth.Packets/Common/NameString.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/Common/NameString.cs similarity index 96% rename from Core/NosSmooth.Packets/Common/NameString.cs rename to Packets/NosSmooth.PacketSerializer.Abstractions/Common/NameString.cs index 5a5c410f1323f86c9b6bbd664ee82d038b56a354..803ce25488c65a59ae0a702ff45b7c01878fc96a 100644 --- a/Core/NosSmooth.Packets/Common/NameString.cs +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/Common/NameString.cs @@ -4,10 +4,7 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System.Net.NetworkInformation; -using System.Reflection; - -namespace NosSmooth.Packets.Common; +namespace NosSmooth.PacketSerializer.Abstractions.Common; /// /// Represents name in the game replacing "^" for " ". diff --git a/Core/NosSmooth.Packets/Errors/CouldNotConvertError.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/Errors/CouldNotConvertError.cs similarity index 86% rename from Core/NosSmooth.Packets/Errors/CouldNotConvertError.cs rename to Packets/NosSmooth.PacketSerializer.Abstractions/Errors/CouldNotConvertError.cs index 7b780409ad2c0788f7ccadef33e3814394c47d1f..cb51fe6e616f56e08eea333129311716f2c09488 100644 --- a/Core/NosSmooth.Packets/Errors/CouldNotConvertError.cs +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/Errors/CouldNotConvertError.cs @@ -4,12 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; -using System.Buffers; -using NosSmooth.Packets.Converters; using Remora.Results; -namespace NosSmooth.Packets.Errors; +namespace NosSmooth.PacketSerializer.Abstractions.Errors; /// /// The value could not be converted. diff --git a/Core/NosSmooth.Packets/Errors/DeserializedValueNullError.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/Errors/DeserializedValueNullError.cs similarity index 88% rename from Core/NosSmooth.Packets/Errors/DeserializedValueNullError.cs rename to Packets/NosSmooth.PacketSerializer.Abstractions/Errors/DeserializedValueNullError.cs index 93cfe081df2f98a6df56e3e04e2257220abec61a..4d7693884ce4883e44f47d531028ed2fb0a17301 100644 --- a/Core/NosSmooth.Packets/Errors/DeserializedValueNullError.cs +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/Errors/DeserializedValueNullError.cs @@ -4,10 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; using Remora.Results; -namespace NosSmooth.Packets.Errors; +namespace NosSmooth.PacketSerializer.Abstractions.Errors; /// /// Deserialized value is null, but it cannot be. diff --git a/Core/NosSmooth.Packets/Errors/ListSerializerError.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/Errors/ListSerializerError.cs similarity index 90% rename from Core/NosSmooth.Packets/Errors/ListSerializerError.cs rename to Packets/NosSmooth.PacketSerializer.Abstractions/Errors/ListSerializerError.cs index 8f25ded33278c3c244976b6d0ad0fbc8ec680d64..f838306e873014a16cba94843cb2d4cbc33fb957 100644 --- a/Core/NosSmooth.Packets/Errors/ListSerializerError.cs +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/Errors/ListSerializerError.cs @@ -6,7 +6,7 @@ using Remora.Results; -namespace NosSmooth.Packets.Errors; +namespace NosSmooth.PacketSerializer.Abstractions.Errors; /// /// Could not parse an item in the list. diff --git a/Core/NosSmooth.Packets/Errors/PacketEndNotExpectedError.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/Errors/PacketEndNotExpectedError.cs similarity index 87% rename from Core/NosSmooth.Packets/Errors/PacketEndNotExpectedError.cs rename to Packets/NosSmooth.PacketSerializer.Abstractions/Errors/PacketEndNotExpectedError.cs index ea892637ecec6f6ec27a2b6dbd5d140a95542c42..39e96fc7e87b518acff896a2b065891c176a8e19 100644 --- a/Core/NosSmooth.Packets/Errors/PacketEndNotExpectedError.cs +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/Errors/PacketEndNotExpectedError.cs @@ -4,11 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; -using NosSmooth.Packets.Converters; using Remora.Results; -namespace NosSmooth.Packets.Errors; +namespace NosSmooth.PacketSerializer.Abstractions.Errors; /// /// The end of a packet was not expected. diff --git a/Core/NosSmooth.Packets/Errors/PacketEndReachedError.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/Errors/PacketEndReachedError.cs similarity index 91% rename from Core/NosSmooth.Packets/Errors/PacketEndReachedError.cs rename to Packets/NosSmooth.PacketSerializer.Abstractions/Errors/PacketEndReachedError.cs index 17c5c4ba0297dc1d69e8b2f4fd9395bbf4af5e8d..43aac3409385734a428b873aaf66e84fe6667c84 100644 --- a/Core/NosSmooth.Packets/Errors/PacketEndReachedError.cs +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/Errors/PacketEndReachedError.cs @@ -6,7 +6,7 @@ using Remora.Results; -namespace NosSmooth.Packets.Errors; +namespace NosSmooth.PacketSerializer.Abstractions.Errors; /// /// The end of a packet was reached already. diff --git a/Core/NosSmooth.Packets/Errors/PacketParameterSerializerError.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/Errors/PacketParameterSerializerError.cs similarity index 91% rename from Core/NosSmooth.Packets/Errors/PacketParameterSerializerError.cs rename to Packets/NosSmooth.PacketSerializer.Abstractions/Errors/PacketParameterSerializerError.cs index 289612c085d31297dc443d1bdfc4697031e784d5..c6f04de4d48c8b5f63cd4d1739d8fe2e3d6b87a4 100644 --- a/Core/NosSmooth.Packets/Errors/PacketParameterSerializerError.cs +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/Errors/PacketParameterSerializerError.cs @@ -4,11 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; -using NosSmooth.Packets.Converters; using Remora.Results; -namespace NosSmooth.Packets.Errors; +namespace NosSmooth.PacketSerializer.Abstractions.Errors; /// /// Could not deserialize one of the packet's properties. diff --git a/Core/NosSmooth.Packets/Errors/WrongTypeError.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/Errors/WrongTypeError.cs similarity index 90% rename from Core/NosSmooth.Packets/Errors/WrongTypeError.cs rename to Packets/NosSmooth.PacketSerializer.Abstractions/Errors/WrongTypeError.cs index 54ccf959d35cf02abd7302fadb3bedb0640ad59a..d438cd545db06a091f527f32e11280332af49122 100644 --- a/Core/NosSmooth.Packets/Errors/WrongTypeError.cs +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/Errors/WrongTypeError.cs @@ -4,11 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; -using NosSmooth.Packets.Converters; using Remora.Results; -namespace NosSmooth.Packets.Errors; +namespace NosSmooth.PacketSerializer.Abstractions.Errors; /// /// The wrong type was passed to a type converter. diff --git a/Core/NosSmooth.Packets/Converters/IStringConverter.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/IStringConverter.cs similarity index 97% rename from Core/NosSmooth.Packets/Converters/IStringConverter.cs rename to Packets/NosSmooth.PacketSerializer.Abstractions/IStringConverter.cs index b04a61767cfb17cbb67c06514464609658234207..9979ebe7f96fa3c848b7bf2e1e306e6abca087d2 100644 --- a/Core/NosSmooth.Packets/Converters/IStringConverter.cs +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/IStringConverter.cs @@ -6,7 +6,7 @@ using Remora.Results; -namespace NosSmooth.Packets.Converters; +namespace NosSmooth.PacketSerializer.Abstractions; /// /// Base type for converting types. diff --git a/Core/NosSmooth.Packets/Converters/IStringConverterRepository.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/IStringConverterRepository.cs similarity index 87% rename from Core/NosSmooth.Packets/Converters/IStringConverterRepository.cs rename to Packets/NosSmooth.PacketSerializer.Abstractions/IStringConverterRepository.cs index b1b9a8cfe8479e6adb1652fc0a904599a00696d2..7de925b18da73b0fcdd1242514809a415950cb34 100644 --- a/Core/NosSmooth.Packets/Converters/IStringConverterRepository.cs +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/IStringConverterRepository.cs @@ -4,12 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; -using NosSmooth.Packets.Converters.Special; -using NosSmooth.Packets.Errors; using Remora.Results; -namespace NosSmooth.Packets.Converters; +namespace NosSmooth.PacketSerializer.Abstractions; /// /// Repository for . diff --git a/Core/NosSmooth.Packets/Converters/IStringSerializer.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/IStringSerializer.cs similarity index 97% rename from Core/NosSmooth.Packets/Converters/IStringSerializer.cs rename to Packets/NosSmooth.PacketSerializer.Abstractions/IStringSerializer.cs index a9e3ef55c4b33de7800a634bb2e4f6a3cd3facf0..ad422750311257cc464eb52bf85125deac615724 100644 --- a/Core/NosSmooth.Packets/Converters/IStringSerializer.cs +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/IStringSerializer.cs @@ -4,10 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; using Remora.Results; -namespace NosSmooth.Packets.Converters; +namespace NosSmooth.PacketSerializer.Abstractions; /// /// Serializer of values from NosTale packet strings. diff --git a/Packets/NosSmooth.PacketSerializer.Abstractions/IsExternalInit.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/IsExternalInit.cs new file mode 100644 index 0000000000000000000000000000000000000000..7c63200cfae2cfd2a9607d18344f77c095a28e9d --- /dev/null +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/IsExternalInit.cs @@ -0,0 +1,15 @@ +// +// IsExternalInit.cs +// +// Copyright (c) František Boháček. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace System.Runtime.CompilerServices +{ + /// + /// Dummy. + /// + public class IsExternalInit + { + } +} \ No newline at end of file diff --git a/Packets/NosSmooth.PacketSerializer.Abstractions/NosSmooth.PacketSerializer.Abstractions.csproj b/Packets/NosSmooth.PacketSerializer.Abstractions/NosSmooth.PacketSerializer.Abstractions.csproj new file mode 100644 index 0000000000000000000000000000000000000000..9278fb58ac43a2029d2b9ee9899602cfdd1fee31 --- /dev/null +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/NosSmooth.PacketSerializer.Abstractions.csproj @@ -0,0 +1,14 @@ + + + + netstandard2.1 + enable + enable + 10 + + + + + + + diff --git a/Core/NosSmooth.Packets/PacketStringBuilder.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/PacketStringBuilder.cs similarity index 99% rename from Core/NosSmooth.Packets/PacketStringBuilder.cs rename to Packets/NosSmooth.PacketSerializer.Abstractions/PacketStringBuilder.cs index f0da1b7bc804a34b17a395894a999771c7989ded..933778095f2205a1bdaf6feb5dab1fa93e16af4c 100644 --- a/Core/NosSmooth.Packets/PacketStringBuilder.cs +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/PacketStringBuilder.cs @@ -4,12 +4,10 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; -using System.Collections.Generic; using System.Text; using Remora.Results; -namespace NosSmooth.Packets; +namespace NosSmooth.PacketSerializer.Abstractions; /// /// String builder for packets. diff --git a/Core/NosSmooth.Packets/PacketStringEnumerator.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/PacketStringEnumerator.cs similarity index 98% rename from Core/NosSmooth.Packets/PacketStringEnumerator.cs rename to Packets/NosSmooth.PacketSerializer.Abstractions/PacketStringEnumerator.cs index 96c27e253b96864e60a68ff628df564ac5dbf537..5cc8d1c33e58d328a4f990b62407138dfa1f23d0 100644 --- a/Core/NosSmooth.Packets/PacketStringEnumerator.cs +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/PacketStringEnumerator.cs @@ -4,13 +4,10 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; -using System.Collections.Generic; -using System.Text; -using NosSmooth.Packets.Errors; +using NosSmooth.PacketSerializer.Abstractions.Errors; using Remora.Results; -namespace NosSmooth.Packets; +namespace NosSmooth.PacketSerializer.Abstractions; /// /// Enumerator for packet strings. diff --git a/Core/NosSmooth.Packets/PacketToken.cs b/Packets/NosSmooth.PacketSerializer.Abstractions/PacketToken.cs similarity index 97% rename from Core/NosSmooth.Packets/PacketToken.cs rename to Packets/NosSmooth.PacketSerializer.Abstractions/PacketToken.cs index 07cc31c9d274846b4012b6f8ae6988b01ce1db5b..b7aff1f3259006e31975df164c1c27fb686bd896 100644 --- a/Core/NosSmooth.Packets/PacketToken.cs +++ b/Packets/NosSmooth.PacketSerializer.Abstractions/PacketToken.cs @@ -4,10 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; using System.Diagnostics.CodeAnalysis; -namespace NosSmooth.Packets; +namespace NosSmooth.PacketSerializer.Abstractions; /// /// The single token from a packet. diff --git a/Core/NosSmooth.Packets/Converters/Basic/BasicTypeConverter.cs b/Packets/NosSmooth.PacketSerializer/Converters/Basic/BasicTypeConverter.cs similarity index 97% rename from Core/NosSmooth.Packets/Converters/Basic/BasicTypeConverter.cs rename to Packets/NosSmooth.PacketSerializer/Converters/Basic/BasicTypeConverter.cs index 33fcccc2b23572394c38b7767d433f6ed1211422..02650862af080321d1b055ac8651eb2678140261 100644 --- a/Core/NosSmooth.Packets/Converters/Basic/BasicTypeConverter.cs +++ b/Packets/NosSmooth.PacketSerializer/Converters/Basic/BasicTypeConverter.cs @@ -5,6 +5,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; +using NosSmooth.PacketSerializer.Abstractions; using Remora.Results; namespace NosSmooth.Packets.Converters.Basic; diff --git a/Core/NosSmooth.Packets/Converters/Basic/BoolStringConverter.cs b/Packets/NosSmooth.PacketSerializer/Converters/Basic/BoolStringConverter.cs similarity index 95% rename from Core/NosSmooth.Packets/Converters/Basic/BoolStringConverter.cs rename to Packets/NosSmooth.PacketSerializer/Converters/Basic/BoolStringConverter.cs index 777a3e0f94825b3f8113179f187a64954a55b2df..ac54db62cc3da765f3581751a29126aab5837137 100644 --- a/Core/NosSmooth.Packets/Converters/Basic/BoolStringConverter.cs +++ b/Packets/NosSmooth.PacketSerializer/Converters/Basic/BoolStringConverter.cs @@ -5,6 +5,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using NosSmooth.Packets.Errors; +using NosSmooth.PacketSerializer.Abstractions; using Remora.Results; namespace NosSmooth.Packets.Converters.Basic; diff --git a/Core/NosSmooth.Packets/Converters/Basic/ByteStringConverter.cs b/Packets/NosSmooth.PacketSerializer/Converters/Basic/ByteStringConverter.cs similarity index 93% rename from Core/NosSmooth.Packets/Converters/Basic/ByteStringConverter.cs rename to Packets/NosSmooth.PacketSerializer/Converters/Basic/ByteStringConverter.cs index 206d5ae97d665abbbfc81682e56c96e5551647cd..e3a4feb41bc87045357ba3fbd47fb5083def5467 100644 --- a/Core/NosSmooth.Packets/Converters/Basic/ByteStringConverter.cs +++ b/Packets/NosSmooth.PacketSerializer/Converters/Basic/ByteStringConverter.cs @@ -6,6 +6,7 @@ using System; using NosSmooth.Packets.Errors; +using NosSmooth.PacketSerializer.Abstractions.Errors; using Remora.Results; namespace NosSmooth.Packets.Converters.Basic; diff --git a/Core/NosSmooth.Packets/Converters/Basic/CharStringConverter.cs b/Packets/NosSmooth.PacketSerializer/Converters/Basic/CharStringConverter.cs similarity index 93% rename from Core/NosSmooth.Packets/Converters/Basic/CharStringConverter.cs rename to Packets/NosSmooth.PacketSerializer/Converters/Basic/CharStringConverter.cs index b711f0ecdd801bf8ea14b5d79050d2755c787c8e..860d23d3b16aaf2fb15c0746a8d816a0eb085692 100644 --- a/Core/NosSmooth.Packets/Converters/Basic/CharStringConverter.cs +++ b/Packets/NosSmooth.PacketSerializer/Converters/Basic/CharStringConverter.cs @@ -6,6 +6,7 @@ using System; using NosSmooth.Packets.Errors; +using NosSmooth.PacketSerializer.Abstractions.Errors; using Remora.Results; namespace NosSmooth.Packets.Converters.Basic; diff --git a/Core/NosSmooth.Packets/Converters/Basic/IntStringConverter.cs b/Packets/NosSmooth.PacketSerializer/Converters/Basic/IntStringConverter.cs similarity index 93% rename from Core/NosSmooth.Packets/Converters/Basic/IntStringConverter.cs rename to Packets/NosSmooth.PacketSerializer/Converters/Basic/IntStringConverter.cs index 2882b5e541793996696c8d1a6da26f858a1c7e1a..888a8e26f0e5346c83fec547ac4e22b68587d155 100644 --- a/Core/NosSmooth.Packets/Converters/Basic/IntStringConverter.cs +++ b/Packets/NosSmooth.PacketSerializer/Converters/Basic/IntStringConverter.cs @@ -6,6 +6,7 @@ using System; using NosSmooth.Packets.Errors; +using NosSmooth.PacketSerializer.Abstractions.Errors; using Remora.Results; namespace NosSmooth.Packets.Converters.Basic; diff --git a/Core/NosSmooth.Packets/Converters/Basic/LongStringConverter.cs b/Packets/NosSmooth.PacketSerializer/Converters/Basic/LongStringConverter.cs similarity index 93% rename from Core/NosSmooth.Packets/Converters/Basic/LongStringConverter.cs rename to Packets/NosSmooth.PacketSerializer/Converters/Basic/LongStringConverter.cs index dec4c3595537ac67c83d960e6d5d88f9c4cfb143..3a6371bc708d2781685f525ed24b0e3ee97cd71b 100644 --- a/Core/NosSmooth.Packets/Converters/Basic/LongStringConverter.cs +++ b/Packets/NosSmooth.PacketSerializer/Converters/Basic/LongStringConverter.cs @@ -6,6 +6,7 @@ using System; using NosSmooth.Packets.Errors; +using NosSmooth.PacketSerializer.Abstractions.Errors; using Remora.Results; namespace NosSmooth.Packets.Converters.Basic; diff --git a/Core/NosSmooth.Packets/Converters/Basic/ShortStringConverter.cs b/Packets/NosSmooth.PacketSerializer/Converters/Basic/ShortStringConverter.cs similarity index 93% rename from Core/NosSmooth.Packets/Converters/Basic/ShortStringConverter.cs rename to Packets/NosSmooth.PacketSerializer/Converters/Basic/ShortStringConverter.cs index 9061d031fad66b5a0d097616cdf5b97d486f7c99..de5b99f6c9a8efaf4e63cb3a949831665fbf2bf0 100644 --- a/Core/NosSmooth.Packets/Converters/Basic/ShortStringConverter.cs +++ b/Packets/NosSmooth.PacketSerializer/Converters/Basic/ShortStringConverter.cs @@ -6,6 +6,7 @@ using System; using NosSmooth.Packets.Errors; +using NosSmooth.PacketSerializer.Abstractions.Errors; using Remora.Results; namespace NosSmooth.Packets.Converters.Basic; diff --git a/Core/NosSmooth.Packets/Converters/Basic/StringTypeConverter.cs b/Packets/NosSmooth.PacketSerializer/Converters/Basic/StringTypeConverter.cs similarity index 100% rename from Core/NosSmooth.Packets/Converters/Basic/StringTypeConverter.cs rename to Packets/NosSmooth.PacketSerializer/Converters/Basic/StringTypeConverter.cs diff --git a/Core/NosSmooth.Packets/Converters/Basic/UIntStringConverter.cs b/Packets/NosSmooth.PacketSerializer/Converters/Basic/UIntStringConverter.cs similarity index 93% rename from Core/NosSmooth.Packets/Converters/Basic/UIntStringConverter.cs rename to Packets/NosSmooth.PacketSerializer/Converters/Basic/UIntStringConverter.cs index bca2e3e467b2a98c607dd2ffb9e08b440a6be3d6..39059c5a35e468be7a35d382dff7af16d90dd01d 100644 --- a/Core/NosSmooth.Packets/Converters/Basic/UIntStringConverter.cs +++ b/Packets/NosSmooth.PacketSerializer/Converters/Basic/UIntStringConverter.cs @@ -6,6 +6,7 @@ using System; using NosSmooth.Packets.Errors; +using NosSmooth.PacketSerializer.Abstractions.Errors; using Remora.Results; namespace NosSmooth.Packets.Converters.Basic; diff --git a/Core/NosSmooth.Packets/Converters/Basic/ULongStringConverter.cs b/Packets/NosSmooth.PacketSerializer/Converters/Basic/ULongStringConverter.cs similarity index 93% rename from Core/NosSmooth.Packets/Converters/Basic/ULongStringConverter.cs rename to Packets/NosSmooth.PacketSerializer/Converters/Basic/ULongStringConverter.cs index 461db6487085f0556654a5b2e53b6b4b66824e88..cb943b05e517f5b2c4690ee20dae115bdb213ab4 100644 --- a/Core/NosSmooth.Packets/Converters/Basic/ULongStringConverter.cs +++ b/Packets/NosSmooth.PacketSerializer/Converters/Basic/ULongStringConverter.cs @@ -6,6 +6,7 @@ using System; using NosSmooth.Packets.Errors; +using NosSmooth.PacketSerializer.Abstractions.Errors; using Remora.Results; namespace NosSmooth.Packets.Converters.Basic; diff --git a/Core/NosSmooth.Packets/Converters/Basic/UShortStringConverter.cs b/Packets/NosSmooth.PacketSerializer/Converters/Basic/UShortStringConverter.cs similarity index 93% rename from Core/NosSmooth.Packets/Converters/Basic/UShortStringConverter.cs rename to Packets/NosSmooth.PacketSerializer/Converters/Basic/UShortStringConverter.cs index 57e696b8c37d9dd71cdb3f95fe1b13be4be3bc3c..3214d4656dfb6b39e2ffed4d149a1a13f2d44e5e 100644 --- a/Core/NosSmooth.Packets/Converters/Basic/UShortStringConverter.cs +++ b/Packets/NosSmooth.PacketSerializer/Converters/Basic/UShortStringConverter.cs @@ -6,6 +6,7 @@ using System; using NosSmooth.Packets.Errors; +using NosSmooth.PacketSerializer.Abstractions.Errors; using Remora.Results; namespace NosSmooth.Packets.Converters.Basic; diff --git a/Core/NosSmooth.Packets/Converters/Common/NameStringConverter.cs b/Packets/NosSmooth.PacketSerializer/Converters/Common/NameStringConverter.cs similarity index 92% rename from Core/NosSmooth.Packets/Converters/Common/NameStringConverter.cs rename to Packets/NosSmooth.PacketSerializer/Converters/Common/NameStringConverter.cs index b1672406c1a67f36b47458026006b29a58f8b385..4352e74c0d3122a2e528c626bc51ebf0df7efa2c 100644 --- a/Core/NosSmooth.Packets/Converters/Common/NameStringConverter.cs +++ b/Packets/NosSmooth.PacketSerializer/Converters/Common/NameStringConverter.cs @@ -4,8 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Common; using NosSmooth.Packets.Converters.Basic; +using NosSmooth.PacketSerializer.Abstractions; +using NosSmooth.PacketSerializer.Abstractions.Common; using Remora.Results; namespace NosSmooth.Packets.Converters.Common; diff --git a/Core/NosSmooth.Packets/Converters/Packets/UpgradeRareSubPacketConverter.cs b/Packets/NosSmooth.PacketSerializer/Converters/Packets/UpgradeRareSubPacketConverter.cs similarity index 93% rename from Core/NosSmooth.Packets/Converters/Packets/UpgradeRareSubPacketConverter.cs rename to Packets/NosSmooth.PacketSerializer/Converters/Packets/UpgradeRareSubPacketConverter.cs index dac0cbbd6f05ea20501b90d6274474eb7d9d9ee1..f1e8f6c592595b58b63cb74e1ee824678f0328fb 100644 --- a/Core/NosSmooth.Packets/Converters/Packets/UpgradeRareSubPacketConverter.cs +++ b/Packets/NosSmooth.PacketSerializer/Converters/Packets/UpgradeRareSubPacketConverter.cs @@ -5,7 +5,9 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using NosSmooth.Packets.Errors; -using NosSmooth.Packets.Packets.Server.Weapons; +using NosSmooth.Packets.Server.Weapons; +using NosSmooth.PacketSerializer.Abstractions; +using NosSmooth.PacketSerializer.Abstractions.Errors; using Remora.Results; namespace NosSmooth.Packets.Converters.Packets; diff --git a/Core/NosSmooth.Packets/Converters/Special/Converters/EnumStringConverter.cs b/Packets/NosSmooth.PacketSerializer/Converters/Special/Converters/EnumStringConverter.cs similarity index 97% rename from Core/NosSmooth.Packets/Converters/Special/Converters/EnumStringConverter.cs rename to Packets/NosSmooth.PacketSerializer/Converters/Special/Converters/EnumStringConverter.cs index b936c74f72cd077c0a09af27737ab30c5d68a8b9..b6b25b53eef570150c5ac9f709bff05019d2554a 100644 --- a/Core/NosSmooth.Packets/Converters/Special/Converters/EnumStringConverter.cs +++ b/Packets/NosSmooth.PacketSerializer/Converters/Special/Converters/EnumStringConverter.cs @@ -5,6 +5,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; +using NosSmooth.PacketSerializer.Abstractions; using Remora.Results; namespace NosSmooth.Packets.Converters.Special.Converters; diff --git a/Core/NosSmooth.Packets/Converters/Special/Converters/ListStringConverter.cs b/Packets/NosSmooth.PacketSerializer/Converters/Special/Converters/ListStringConverter.cs similarity index 96% rename from Core/NosSmooth.Packets/Converters/Special/Converters/ListStringConverter.cs rename to Packets/NosSmooth.PacketSerializer/Converters/Special/Converters/ListStringConverter.cs index 70ded0e31c0d3e3de3edefb8343d6de36e05b12b..b5ad3e74730ae7e386cfab3565e71e66921a7c10 100644 --- a/Core/NosSmooth.Packets/Converters/Special/Converters/ListStringConverter.cs +++ b/Packets/NosSmooth.PacketSerializer/Converters/Special/Converters/ListStringConverter.cs @@ -8,6 +8,8 @@ using System; using System.Collections; using System.Collections.Generic; using NosSmooth.Packets.Errors; +using NosSmooth.PacketSerializer.Abstractions; +using NosSmooth.PacketSerializer.Abstractions.Errors; using Remora.Results; namespace NosSmooth.Packets.Converters.Special.Converters; diff --git a/Core/NosSmooth.Packets/Converters/Special/Converters/NullableStringConverter.cs b/Packets/NosSmooth.PacketSerializer/Converters/Special/Converters/NullableStringConverter.cs similarity index 97% rename from Core/NosSmooth.Packets/Converters/Special/Converters/NullableStringConverter.cs rename to Packets/NosSmooth.PacketSerializer/Converters/Special/Converters/NullableStringConverter.cs index ff7b4a37dbf5eb6125794e87654aeb1b84ef2e14..f126eafd799e98a7ca056db318857c7c5e3196a4 100644 --- a/Core/NosSmooth.Packets/Converters/Special/Converters/NullableStringConverter.cs +++ b/Packets/NosSmooth.PacketSerializer/Converters/Special/Converters/NullableStringConverter.cs @@ -5,6 +5,7 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; +using NosSmooth.PacketSerializer.Abstractions; using Remora.Results; namespace NosSmooth.Packets.Converters.Special.Converters; diff --git a/Core/NosSmooth.Packets/Converters/Special/EnumStringConverterFactory.cs b/Packets/NosSmooth.PacketSerializer/Converters/Special/EnumStringConverterFactory.cs similarity index 97% rename from Core/NosSmooth.Packets/Converters/Special/EnumStringConverterFactory.cs rename to Packets/NosSmooth.PacketSerializer/Converters/Special/EnumStringConverterFactory.cs index 8db79b5471bccd0088db48910cdfa8141ac02be3..ba20ed704701e6b4f6e00cd239c791e5698bc923 100644 --- a/Core/NosSmooth.Packets/Converters/Special/EnumStringConverterFactory.cs +++ b/Packets/NosSmooth.PacketSerializer/Converters/Special/EnumStringConverterFactory.cs @@ -8,6 +8,7 @@ using System; using Microsoft.Extensions.DependencyInjection; using NosSmooth.Packets.Converters.Special.Converters; using NosSmooth.Packets.Extensions; +using NosSmooth.PacketSerializer.Abstractions; using Remora.Results; namespace NosSmooth.Packets.Converters.Special; diff --git a/Core/NosSmooth.Packets/Converters/Special/IStringConverterFactory.cs b/Packets/NosSmooth.PacketSerializer/Converters/Special/IStringConverterFactory.cs similarity index 96% rename from Core/NosSmooth.Packets/Converters/Special/IStringConverterFactory.cs rename to Packets/NosSmooth.PacketSerializer/Converters/Special/IStringConverterFactory.cs index 6b94acd86f608cfc75bdd8c911f0ce1daaf408df..7ac7b406b9e1dad434dbd39a54e4f4c75d5f7468 100644 --- a/Core/NosSmooth.Packets/Converters/Special/IStringConverterFactory.cs +++ b/Packets/NosSmooth.PacketSerializer/Converters/Special/IStringConverterFactory.cs @@ -6,6 +6,7 @@ using System; using NosSmooth.Packets.Errors; +using NosSmooth.PacketSerializer.Abstractions; using Remora.Results; namespace NosSmooth.Packets.Converters.Special; diff --git a/Core/NosSmooth.Packets/Converters/Special/ListStringConverterFactory.cs b/Packets/NosSmooth.PacketSerializer/Converters/Special/ListStringConverterFactory.cs similarity index 97% rename from Core/NosSmooth.Packets/Converters/Special/ListStringConverterFactory.cs rename to Packets/NosSmooth.PacketSerializer/Converters/Special/ListStringConverterFactory.cs index e3b4e2f2ffc0f16c05ef09d6a3993a3da75bcaf3..5e728c2bf14361f0cb2dd5c2ca44842bdefc1b75 100644 --- a/Core/NosSmooth.Packets/Converters/Special/ListStringConverterFactory.cs +++ b/Packets/NosSmooth.PacketSerializer/Converters/Special/ListStringConverterFactory.cs @@ -16,6 +16,7 @@ using Microsoft.Extensions.DependencyInjection; using NosSmooth.Packets.Converters.Special.Converters; using NosSmooth.Packets.Errors; using NosSmooth.Packets.Extensions; +using NosSmooth.PacketSerializer.Abstractions; using Remora.Results; namespace NosSmooth.Packets.Converters.Special; diff --git a/Core/NosSmooth.Packets/Converters/Special/NullableStringConverterFactory.cs b/Packets/NosSmooth.PacketSerializer/Converters/Special/NullableStringConverterFactory.cs similarity index 97% rename from Core/NosSmooth.Packets/Converters/Special/NullableStringConverterFactory.cs rename to Packets/NosSmooth.PacketSerializer/Converters/Special/NullableStringConverterFactory.cs index 0ba9626d07a9556c5bc707986ba8a711967f7be7..6213a5785046d9b95ebbf537e2e0219dbbae58f0 100644 --- a/Core/NosSmooth.Packets/Converters/Special/NullableStringConverterFactory.cs +++ b/Packets/NosSmooth.PacketSerializer/Converters/Special/NullableStringConverterFactory.cs @@ -8,6 +8,7 @@ using System; using Microsoft.Extensions.DependencyInjection; using NosSmooth.Packets.Converters.Special.Converters; using NosSmooth.Packets.Extensions; +using NosSmooth.PacketSerializer.Abstractions; using Remora.Results; namespace NosSmooth.Packets.Converters.Special; diff --git a/Core/NosSmooth.Packets/Converters/Special/StringSerializer.cs b/Packets/NosSmooth.PacketSerializer/Converters/Special/StringSerializer.cs similarity index 98% rename from Core/NosSmooth.Packets/Converters/Special/StringSerializer.cs rename to Packets/NosSmooth.PacketSerializer/Converters/Special/StringSerializer.cs index f976129652a61100a7f46270e64bd0c6f3fc06b2..84fefc2757cddec719d75eb18e9d542d42583b27 100644 --- a/Core/NosSmooth.Packets/Converters/Special/StringSerializer.cs +++ b/Packets/NosSmooth.PacketSerializer/Converters/Special/StringSerializer.cs @@ -6,6 +6,7 @@ using System; using NosSmooth.Packets.Errors; +using NosSmooth.PacketSerializer.Abstractions; using Remora.Results; namespace NosSmooth.Packets.Converters.Special; diff --git a/Core/NosSmooth.Packets/Converters/StringConverterRepository.cs b/Packets/NosSmooth.PacketSerializer/Converters/StringConverterRepository.cs similarity index 98% rename from Core/NosSmooth.Packets/Converters/StringConverterRepository.cs rename to Packets/NosSmooth.PacketSerializer/Converters/StringConverterRepository.cs index e2a9d29fc1544b616c78fda55d93514072ae4c29..f445b2e77a8816f7e2e65bca806b9f08d256601c 100644 --- a/Core/NosSmooth.Packets/Converters/StringConverterRepository.cs +++ b/Packets/NosSmooth.PacketSerializer/Converters/StringConverterRepository.cs @@ -12,6 +12,7 @@ using Microsoft.Extensions.DependencyInjection; using NosSmooth.Packets.Converters.Special; using NosSmooth.Packets.Errors; using NosSmooth.Packets.Extensions; +using NosSmooth.PacketSerializer.Abstractions; using Remora.Results; namespace NosSmooth.Packets.Converters; diff --git a/Core/NosSmooth.Packets/Errors/AmbiguousHeaderError.cs b/Packets/NosSmooth.PacketSerializer/Errors/AmbiguousHeaderError.cs similarity index 94% rename from Core/NosSmooth.Packets/Errors/AmbiguousHeaderError.cs rename to Packets/NosSmooth.PacketSerializer/Errors/AmbiguousHeaderError.cs index 5ad82c4cc0d5d49f1cec55b3d36f3cce8590e733..ba434495777e75150d681b95aa5bf5837b610781 100644 --- a/Core/NosSmooth.Packets/Errors/AmbiguousHeaderError.cs +++ b/Packets/NosSmooth.PacketSerializer/Errors/AmbiguousHeaderError.cs @@ -7,8 +7,8 @@ using System; using System.Collections.Generic; using System.Linq; -using NosSmooth.Packets.Attributes; using NosSmooth.Packets.Packets; +using NosSmooth.PacketSerializer.Abstractions.Attributes; using Remora.Results; namespace NosSmooth.Packets.Errors; diff --git a/Core/NosSmooth.Packets/Errors/PacketConverterNotFoundError.cs b/Packets/NosSmooth.PacketSerializer/Errors/PacketConverterNotFoundError.cs similarity index 100% rename from Core/NosSmooth.Packets/Errors/PacketConverterNotFoundError.cs rename to Packets/NosSmooth.PacketSerializer/Errors/PacketConverterNotFoundError.cs diff --git a/Core/NosSmooth.Packets/Errors/PacketMissingHeaderError.cs b/Packets/NosSmooth.PacketSerializer/Errors/PacketMissingHeaderError.cs similarity index 100% rename from Core/NosSmooth.Packets/Errors/PacketMissingHeaderError.cs rename to Packets/NosSmooth.PacketSerializer/Errors/PacketMissingHeaderError.cs diff --git a/Core/NosSmooth.Packets/Errors/TypeConverterNotFoundError.cs b/Packets/NosSmooth.PacketSerializer/Errors/TypeConverterNotFoundError.cs similarity index 100% rename from Core/NosSmooth.Packets/Errors/TypeConverterNotFoundError.cs rename to Packets/NosSmooth.PacketSerializer/Errors/TypeConverterNotFoundError.cs diff --git a/Core/NosSmooth.Packets/Extensions/ConcurrentDictionaryExtensions.cs b/Packets/NosSmooth.PacketSerializer/Extensions/ConcurrentDictionaryExtensions.cs similarity index 100% rename from Core/NosSmooth.Packets/Extensions/ConcurrentDictionaryExtensions.cs rename to Packets/NosSmooth.PacketSerializer/Extensions/ConcurrentDictionaryExtensions.cs diff --git a/Core/NosSmooth.Packets/Extensions/ResultExtensions.cs b/Packets/NosSmooth.PacketSerializer/Extensions/ResultExtensions.cs similarity index 100% rename from Core/NosSmooth.Packets/Extensions/ResultExtensions.cs rename to Packets/NosSmooth.PacketSerializer/Extensions/ResultExtensions.cs diff --git a/Core/NosSmooth.Packets/Extensions/ServiceCollectionExtensions.cs b/Packets/NosSmooth.PacketSerializer/Extensions/ServiceCollectionExtensions.cs similarity index 97% rename from Core/NosSmooth.Packets/Extensions/ServiceCollectionExtensions.cs rename to Packets/NosSmooth.PacketSerializer/Extensions/ServiceCollectionExtensions.cs index 170cf0dfe75722c1d3dd928d4e5bb024b77a0da9..c4e2baf73e518011c9323c093f9902dbfc9728b4 100644 --- a/Core/NosSmooth.Packets/Extensions/ServiceCollectionExtensions.cs +++ b/Packets/NosSmooth.PacketSerializer/Extensions/ServiceCollectionExtensions.cs @@ -14,6 +14,7 @@ using NosSmooth.Packets.Converters.Common; using NosSmooth.Packets.Converters.Packets; using NosSmooth.Packets.Converters.Special; using NosSmooth.Packets.Packets; +using NosSmooth.PacketSerializer.Abstractions; namespace NosSmooth.Packets.Extensions; @@ -40,7 +41,7 @@ public static class ServiceCollectionExtensions .AddSingleton(p => { var repository = new PacketTypesRepository(p.GetRequiredService()); - var packetTypes = typeof(ServiceCollectionExtensions).Assembly + var packetTypes = typeof(IPacket).Assembly .GetExportedTypes() .Where(x => x != typeof(UnresolvedPacket) && !x.IsAbstract && typeof(IPacket).IsAssignableFrom(x)); foreach (var packetType in packetTypes) @@ -55,7 +56,7 @@ public static class ServiceCollectionExtensions return repository; }) - .AddGeneratedSerializers(typeof(ServiceCollectionExtensions).Assembly) + .AddGeneratedSerializers(typeof(IPacket).Assembly) .AddBasicConverters(); } diff --git a/Core/NosSmooth.Packets/IPacketSerializer.cs b/Packets/NosSmooth.PacketSerializer/IPacketSerializer.cs similarity index 95% rename from Core/NosSmooth.Packets/IPacketSerializer.cs rename to Packets/NosSmooth.PacketSerializer/IPacketSerializer.cs index 461e5c7488de5a5a9e11372ea62f3c253cb1b13a..1a2be1dbfccc35f4558eefafb1c6adef4b560134 100644 --- a/Core/NosSmooth.Packets/IPacketSerializer.cs +++ b/Packets/NosSmooth.PacketSerializer/IPacketSerializer.cs @@ -4,9 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; using NosSmooth.Packets.Errors; using NosSmooth.Packets.Packets; +using NosSmooth.PacketSerializer.Abstractions.Attributes; using Remora.Results; namespace NosSmooth.Packets; diff --git a/Core/NosSmooth.PacketSerializersGenerator/IsExternalInit.cs b/Packets/NosSmooth.PacketSerializer/IsExternalInit.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/IsExternalInit.cs rename to Packets/NosSmooth.PacketSerializer/IsExternalInit.cs diff --git a/Core/NosSmooth.Packets/NosCore.Packets.csproj.DotSettings b/Packets/NosSmooth.PacketSerializer/NosCore.Packets.csproj.DotSettings similarity index 100% rename from Core/NosSmooth.Packets/NosCore.Packets.csproj.DotSettings rename to Packets/NosSmooth.PacketSerializer/NosCore.Packets.csproj.DotSettings diff --git a/Core/NosSmooth.Packets/NosSmooth.Packets.csproj b/Packets/NosSmooth.PacketSerializer/NosSmooth.PacketSerializer.csproj similarity index 56% rename from Core/NosSmooth.Packets/NosSmooth.Packets.csproj rename to Packets/NosSmooth.PacketSerializer/NosSmooth.PacketSerializer.csproj index c0e591c6322a2e53848e0ae311f2128df369d0b5..57ce2f6c09831de87b7eeaf6fbe7c05d0e518bf0 100644 --- a/Core/NosSmooth.Packets/NosSmooth.Packets.csproj +++ b/Packets/NosSmooth.PacketSerializer/NosSmooth.PacketSerializer.csproj @@ -2,8 +2,8 @@ 10 - NosSmooth.Packets - NosSmooth.Packets + NosSmooth.PacketSerializer + NosSmooth.PacketSerializer net6.0;netstandard2.1 @@ -11,9 +11,10 @@ - + - + + diff --git a/Core/NosSmooth.Packets/PacketSerializer.cs b/Packets/NosSmooth.PacketSerializer/PacketSerializer.cs similarity index 94% rename from Core/NosSmooth.Packets/PacketSerializer.cs rename to Packets/NosSmooth.PacketSerializer/PacketSerializer.cs index 57d8ebeaa1d74d1fc318394d9d37efaba74e264e..8fe37dbe446443e48ba8a2d4b692cd0731de418b 100644 --- a/Core/NosSmooth.Packets/PacketSerializer.cs +++ b/Packets/NosSmooth.PacketSerializer/PacketSerializer.cs @@ -5,10 +5,12 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; -using NosSmooth.Packets.Attributes; using NosSmooth.Packets.Converters; using NosSmooth.Packets.Errors; using NosSmooth.Packets.Packets; +using NosSmooth.PacketSerializer.Abstractions; +using NosSmooth.PacketSerializer.Abstractions.Attributes; +using NosSmooth.PacketSerializer.Abstractions.Errors; using Remora.Results; namespace NosSmooth.Packets; diff --git a/Core/NosSmooth.Packets/Packets/IPacketTypesRepository.cs b/Packets/NosSmooth.PacketSerializer/Packets/IPacketTypesRepository.cs similarity index 97% rename from Core/NosSmooth.Packets/Packets/IPacketTypesRepository.cs rename to Packets/NosSmooth.PacketSerializer/Packets/IPacketTypesRepository.cs index 6ee92434417d5d11a5b2374184c722deed7f625b..89923c1ee06d103cadb0811cbc9d168ab697cf42 100644 --- a/Core/NosSmooth.Packets/Packets/IPacketTypesRepository.cs +++ b/Packets/NosSmooth.PacketSerializer/Packets/IPacketTypesRepository.cs @@ -7,8 +7,8 @@ using System; using System.Collections.Generic; using System.Reflection; -using NosSmooth.Packets.Attributes; using NosSmooth.Packets.Errors; +using NosSmooth.PacketSerializer.Abstractions.Attributes; using Remora.Results; namespace NosSmooth.Packets.Packets; diff --git a/Core/NosSmooth.Packets/Packets/PacketInfo.cs b/Packets/NosSmooth.PacketSerializer/Packets/PacketInfo.cs similarity index 92% rename from Core/NosSmooth.Packets/Packets/PacketInfo.cs rename to Packets/NosSmooth.PacketSerializer/Packets/PacketInfo.cs index 28cd768c148d97e75680af60b27e1610c455cca6..32a02de75162fce915f8ba29b79112915091c849 100644 --- a/Core/NosSmooth.Packets/Packets/PacketInfo.cs +++ b/Packets/NosSmooth.PacketSerializer/Packets/PacketInfo.cs @@ -6,6 +6,7 @@ using System; using NosSmooth.Packets.Converters; +using NosSmooth.PacketSerializer.Abstractions; namespace NosSmooth.Packets.Packets; diff --git a/Core/NosSmooth.Packets/Packets/PacketTypesRepository.cs b/Packets/NosSmooth.PacketSerializer/Packets/PacketTypesRepository.cs similarity index 98% rename from Core/NosSmooth.Packets/Packets/PacketTypesRepository.cs rename to Packets/NosSmooth.PacketSerializer/Packets/PacketTypesRepository.cs index 17e097cc4a667d3b5899c3d7870e474c2988cbc8..b6d8024dbae537bfff0c691bb3b6a8c337948769 100644 --- a/Core/NosSmooth.Packets/Packets/PacketTypesRepository.cs +++ b/Packets/NosSmooth.PacketSerializer/Packets/PacketTypesRepository.cs @@ -9,9 +9,10 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; using Microsoft.Extensions.DependencyInjection; -using NosSmooth.Packets.Attributes; using NosSmooth.Packets.Converters; using NosSmooth.Packets.Errors; +using NosSmooth.PacketSerializer.Abstractions; +using NosSmooth.PacketSerializer.Abstractions.Attributes; using Remora.Results; namespace NosSmooth.Packets.Packets; diff --git a/Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/IParameterGenerator.cs b/Packets/NosSmooth.PacketSerializersGenerator/AttributeGenerators/IParameterGenerator.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/IParameterGenerator.cs rename to Packets/NosSmooth.PacketSerializersGenerator/AttributeGenerators/IParameterGenerator.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketConditionalIndexAttributeGenerator.cs b/Packets/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketConditionalIndexAttributeGenerator.cs similarity index 99% rename from Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketConditionalIndexAttributeGenerator.cs rename to Packets/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketConditionalIndexAttributeGenerator.cs index f77e3e40a7edce0554aee5ccb2db227787dc06e7..6c0f669e4e05913ec972fa770dd2d0d7fda1968e 100644 --- a/Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketConditionalIndexAttributeGenerator.cs +++ b/Packets/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketConditionalIndexAttributeGenerator.cs @@ -31,7 +31,7 @@ public class PacketConditionalIndexAttributeGenerator : IParameterGenerator /// Gets the full name of the packet index attribute. /// public static string PacketConditionalIndexAttributeFullName - => "NosSmooth.Packets.Attributes.PacketConditionalIndexAttribute"; + => "NosSmooth.PacketSerializer.Abstractions.Attributes.PacketConditionalIndexAttribute"; /// public bool ShouldHandle(ParameterInfo parameter) diff --git a/Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketContextListAttributeGenerator.cs b/Packets/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketContextListAttributeGenerator.cs similarity index 94% rename from Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketContextListAttributeGenerator.cs rename to Packets/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketContextListAttributeGenerator.cs index 2a3fed4ca5b746e8c0572457315d4394e1fe019b..36e94e74a8271ed201cd7147f9aa3405fe1dccce 100644 --- a/Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketContextListAttributeGenerator.cs +++ b/Packets/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketContextListAttributeGenerator.cs @@ -31,7 +31,8 @@ public class PacketContextListAttributeGenerator : IParameterGenerator /// /// Gets the full name of the packet index attribute. /// - public static string PacketListIndexAttributeFullName => "NosSmooth.Packets.Attributes.PacketContextListAttribute"; + public static string PacketListIndexAttributeFullName + => "NosSmooth.PacketSerializer.Abstractions.Attributes.PacketContextListAttribute"; /// public bool ShouldHandle(ParameterInfo parameter) @@ -120,7 +121,8 @@ public class PacketContextListAttributeGenerator : IParameterGenerator generator.PopLevel(); if (!parameter.Nullable) { - generator.CheckNullError(parameter.GetNullableVariableName(), parameter.GetResultVariableName(), parameter.Name); + generator.CheckNullError + (parameter.GetNullableVariableName(), parameter.GetResultVariableName(), parameter.Name); } generator.AssignLocalVariable(parameter); diff --git a/Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketGreedyIndexAttributeGenerator.cs b/Packets/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketGreedyIndexAttributeGenerator.cs similarity index 92% rename from Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketGreedyIndexAttributeGenerator.cs rename to Packets/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketGreedyIndexAttributeGenerator.cs index cf2d2ac0c05eb74dc3dcd34ae8e420adc94648f4..065b2195bb4fe813a98a4a25f737c9ff0cbed57b 100644 --- a/Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketGreedyIndexAttributeGenerator.cs +++ b/Packets/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketGreedyIndexAttributeGenerator.cs @@ -30,7 +30,8 @@ public class PacketGreedyIndexAttributeGenerator : IParameterGenerator /// /// Gets the full name of the packet index attribute. /// - public static string PacketIndexAttributeFullName => "NosSmooth.Packets.Attributes.PacketGreedyIndexAttribute"; + public static string PacketIndexAttributeFullName + => "NosSmooth.PacketSerializer.Abstractions.Attributes.PacketGreedyIndexAttribute"; /// public bool ShouldHandle(ParameterInfo parameter) @@ -86,7 +87,8 @@ public class PacketGreedyIndexAttributeGenerator : IParameterGenerator if (!parameter.Nullable) { - generator.CheckNullError(parameter.GetNullableVariableName(), parameter.GetResultVariableName(), parameter.Name); + generator.CheckNullError + (parameter.GetNullableVariableName(), parameter.GetResultVariableName(), parameter.Name); } generator.AssignLocalVariable(parameter, false); diff --git a/Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketIndexAttributeGenerator.cs b/Packets/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketIndexAttributeGenerator.cs similarity index 97% rename from Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketIndexAttributeGenerator.cs rename to Packets/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketIndexAttributeGenerator.cs index ebf6ab192d8140ffb1942a9d33394f2a5d23c37e..7c5d46132ca208a337b8158ce17091f095c9bd31 100644 --- a/Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketIndexAttributeGenerator.cs +++ b/Packets/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketIndexAttributeGenerator.cs @@ -28,7 +28,8 @@ public class PacketIndexAttributeGenerator : IParameterGenerator /// /// Gets the full name of the packet index attribute. /// - public static string PacketIndexAttributeFullName => "NosSmooth.Packets.Attributes.PacketIndexAttribute"; + public static string PacketIndexAttributeFullName + => "NosSmooth.PacketSerializer.Abstractions.Attributes.PacketIndexAttribute"; /// public bool ShouldHandle(ParameterInfo parameter) diff --git a/Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketListIndexAttributeGenerator.cs b/Packets/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketListIndexAttributeGenerator.cs similarity index 94% rename from Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketListIndexAttributeGenerator.cs rename to Packets/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketListIndexAttributeGenerator.cs index f5c3ff56ae9ff6c7f38511780baac272c6d5d660..225e7864f42b2842b137afaf4266200cc4a0f673 100644 --- a/Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketListIndexAttributeGenerator.cs +++ b/Packets/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketListIndexAttributeGenerator.cs @@ -33,7 +33,8 @@ public class PacketListIndexAttributeGenerator : IParameterGenerator /// /// Gets the full name of the packet index attribute. /// - public static string PacketListIndexAttributeFullName => "NosSmooth.Packets.Attributes.PacketListIndexAttribute"; + public static string PacketListIndexAttributeFullName + => "NosSmooth.PacketSerializer.Abstractions.Attributes.PacketListIndexAttribute"; /// public bool ShouldHandle(ParameterInfo parameter) @@ -124,7 +125,8 @@ public class PacketListIndexAttributeGenerator : IParameterGenerator generator.PopLevel(); if (!parameter.Nullable) { - generator.CheckNullError(parameter.GetNullableVariableName(), parameter.GetResultVariableName(), parameter.Name); + generator.CheckNullError + (parameter.GetNullableVariableName(), parameter.GetResultVariableName(), parameter.Name); } generator.AssignLocalVariable(parameter, false); diff --git a/Core/NosSmooth.PacketSerializersGenerator/Constants.cs b/Packets/NosSmooth.PacketSerializersGenerator/Constants.cs similarity index 86% rename from Core/NosSmooth.PacketSerializersGenerator/Constants.cs rename to Packets/NosSmooth.PacketSerializersGenerator/Constants.cs index 87bb338fbbd5dbb71ae6e41c2c633a37201bf26f..a7eb434637576b3b5c3f12b5dcb9c85e4b7c4e12 100644 --- a/Core/NosSmooth.PacketSerializersGenerator/Constants.cs +++ b/Packets/NosSmooth.PacketSerializersGenerator/Constants.cs @@ -14,12 +14,12 @@ public class Constants /// /// Gets the full name of the generate source attribute class. /// - public static string GenerateSourceAttributeClass => "NosSmooth.Packets.Attributes.GenerateSerializerAttribute"; + public static string GenerateSourceAttributeClass => "NosSmooth.PacketSerializer.Abstractions.Attributes.GenerateSerializerAttribute"; /// /// Gets the full name of the packet attribute classes that are used for the generation. /// - public static string PacketAttributesClassRegex => @"^NosSmooth\.Packets\.Attributes\.Packet.*"; + public static string PacketAttributesClassRegex => @"^NosSmooth\.PacketSerializer\.Abstractions\.Attributes\.Packet.*"; /// /// Gets the full name of helper class used for inline type converters. diff --git a/Core/NosSmooth.PacketSerializersGenerator/ConverterDeserializationGenerator.cs b/Packets/NosSmooth.PacketSerializersGenerator/ConverterDeserializationGenerator.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/ConverterDeserializationGenerator.cs rename to Packets/NosSmooth.PacketSerializersGenerator/ConverterDeserializationGenerator.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/ConverterSerializationGenerator.cs b/Packets/NosSmooth.PacketSerializersGenerator/ConverterSerializationGenerator.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/ConverterSerializationGenerator.cs rename to Packets/NosSmooth.PacketSerializersGenerator/ConverterSerializationGenerator.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/Data/AttributeInfo.cs b/Packets/NosSmooth.PacketSerializersGenerator/Data/AttributeInfo.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/Data/AttributeInfo.cs rename to Packets/NosSmooth.PacketSerializersGenerator/Data/AttributeInfo.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/Data/PacketInfo.cs b/Packets/NosSmooth.PacketSerializersGenerator/Data/PacketInfo.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/Data/PacketInfo.cs rename to Packets/NosSmooth.PacketSerializersGenerator/Data/PacketInfo.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/Data/ParameterInfo.cs b/Packets/NosSmooth.PacketSerializersGenerator/Data/ParameterInfo.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/Data/ParameterInfo.cs rename to Packets/NosSmooth.PacketSerializersGenerator/Data/ParameterInfo.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/Data/Parameters.cs b/Packets/NosSmooth.PacketSerializersGenerator/Data/Parameters.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/Data/Parameters.cs rename to Packets/NosSmooth.PacketSerializersGenerator/Data/Parameters.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/Errors/DiagnosticError.cs b/Packets/NosSmooth.PacketSerializersGenerator/Errors/DiagnosticError.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/Errors/DiagnosticError.cs rename to Packets/NosSmooth.PacketSerializersGenerator/Errors/DiagnosticError.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/Errors/IError.cs b/Packets/NosSmooth.PacketSerializersGenerator/Errors/IError.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/Errors/IError.cs rename to Packets/NosSmooth.PacketSerializersGenerator/Errors/IError.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/Extensions/AttributeArgumentSyntaxExtensions.cs b/Packets/NosSmooth.PacketSerializersGenerator/Extensions/AttributeArgumentSyntaxExtensions.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/Extensions/AttributeArgumentSyntaxExtensions.cs rename to Packets/NosSmooth.PacketSerializersGenerator/Extensions/AttributeArgumentSyntaxExtensions.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/Extensions/AttributeInfoExtensions.cs b/Packets/NosSmooth.PacketSerializersGenerator/Extensions/AttributeInfoExtensions.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/Extensions/AttributeInfoExtensions.cs rename to Packets/NosSmooth.PacketSerializersGenerator/Extensions/AttributeInfoExtensions.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/Extensions/AttributeListSyntaxExtensions.cs b/Packets/NosSmooth.PacketSerializersGenerator/Extensions/AttributeListSyntaxExtensions.cs similarity index 92% rename from Core/NosSmooth.PacketSerializersGenerator/Extensions/AttributeListSyntaxExtensions.cs rename to Packets/NosSmooth.PacketSerializersGenerator/Extensions/AttributeListSyntaxExtensions.cs index 9a035157f86a61b07a9ce5622aea985cb856ca98..d4636a645d6b41b7b933183399c0158ed457acc5 100644 --- a/Core/NosSmooth.PacketSerializersGenerator/Extensions/AttributeListSyntaxExtensions.cs +++ b/Packets/NosSmooth.PacketSerializersGenerator/Extensions/AttributeListSyntaxExtensions.cs @@ -24,6 +24,7 @@ public static class AttributeListSyntaxExtensions /// Whether the attribute is present. public static bool ContainsAttribute(this AttributeListSyntax attributeList, SemanticModel semanticModel, string attributeFullName) { + var first = semanticModel.GetTypeInfo(attributeList.Attributes[0]).Type?.ToString()!; return attributeList.Attributes.Any(x => Regex.IsMatch(semanticModel.GetTypeInfo(x).Type?.ToString()!, attributeFullName)); } } \ No newline at end of file diff --git a/Core/NosSmooth.PacketSerializersGenerator/Extensions/IndentedTextWriterExtensions.cs b/Packets/NosSmooth.PacketSerializersGenerator/Extensions/IndentedTextWriterExtensions.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/Extensions/IndentedTextWriterExtensions.cs rename to Packets/NosSmooth.PacketSerializersGenerator/Extensions/IndentedTextWriterExtensions.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/Extensions/ParameterInfoExtensions.cs b/Packets/NosSmooth.PacketSerializersGenerator/Extensions/ParameterInfoExtensions.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/Extensions/ParameterInfoExtensions.cs rename to Packets/NosSmooth.PacketSerializersGenerator/Extensions/ParameterInfoExtensions.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/Extensions/SyntaxNodeExtensions.cs b/Packets/NosSmooth.PacketSerializersGenerator/Extensions/SyntaxNodeExtensions.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/Extensions/SyntaxNodeExtensions.cs rename to Packets/NosSmooth.PacketSerializersGenerator/Extensions/SyntaxNodeExtensions.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/Extensions/TypeSymbolExtensions.cs b/Packets/NosSmooth.PacketSerializersGenerator/Extensions/TypeSymbolExtensions.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/Extensions/TypeSymbolExtensions.cs rename to Packets/NosSmooth.PacketSerializersGenerator/Extensions/TypeSymbolExtensions.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/Extensions/TypeSyntaxExtensions.cs b/Packets/NosSmooth.PacketSerializersGenerator/Extensions/TypeSyntaxExtensions.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/Extensions/TypeSyntaxExtensions.cs rename to Packets/NosSmooth.PacketSerializersGenerator/Extensions/TypeSyntaxExtensions.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/BasicInlineConverterGenerator.cs b/Packets/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/BasicInlineConverterGenerator.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/BasicInlineConverterGenerator.cs rename to Packets/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/BasicInlineConverterGenerator.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/BoolInlineConverterGenerator.cs b/Packets/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/BoolInlineConverterGenerator.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/BoolInlineConverterGenerator.cs rename to Packets/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/BoolInlineConverterGenerator.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/EnumInlineConverterGenerator.cs b/Packets/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/EnumInlineConverterGenerator.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/EnumInlineConverterGenerator.cs rename to Packets/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/EnumInlineConverterGenerator.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/FallbackInlineConverterGenerator.cs b/Packets/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/FallbackInlineConverterGenerator.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/FallbackInlineConverterGenerator.cs rename to Packets/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/FallbackInlineConverterGenerator.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/IInlineConverterGenerator.cs b/Packets/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/IInlineConverterGenerator.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/IInlineConverterGenerator.cs rename to Packets/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/IInlineConverterGenerator.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/ListInlineConverterGenerator.cs b/Packets/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/ListInlineConverterGenerator.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/ListInlineConverterGenerator.cs rename to Packets/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/ListInlineConverterGenerator.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/StringInlineConverterGenerator.cs b/Packets/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/StringInlineConverterGenerator.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/StringInlineConverterGenerator.cs rename to Packets/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/StringInlineConverterGenerator.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/InlineTypeConverterGenerator.cs b/Packets/NosSmooth.PacketSerializersGenerator/InlineTypeConverterGenerator.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/InlineTypeConverterGenerator.cs rename to Packets/NosSmooth.PacketSerializersGenerator/InlineTypeConverterGenerator.cs diff --git a/Core/NosSmooth.Packets/IsExternalInit.cs b/Packets/NosSmooth.PacketSerializersGenerator/IsExternalInit.cs similarity index 100% rename from Core/NosSmooth.Packets/IsExternalInit.cs rename to Packets/NosSmooth.PacketSerializersGenerator/IsExternalInit.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/NosSmooth.PacketSerializersGenerator.csproj b/Packets/NosSmooth.PacketSerializersGenerator/NosSmooth.PacketSerializersGenerator.csproj similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/NosSmooth.PacketSerializersGenerator.csproj rename to Packets/NosSmooth.PacketSerializersGenerator/NosSmooth.PacketSerializersGenerator.csproj diff --git a/Core/NosSmooth.PacketSerializersGenerator/PacketConverterGenerator.cs b/Packets/NosSmooth.PacketSerializersGenerator/PacketConverterGenerator.cs similarity index 98% rename from Core/NosSmooth.PacketSerializersGenerator/PacketConverterGenerator.cs rename to Packets/NosSmooth.PacketSerializersGenerator/PacketConverterGenerator.cs index 028a9c3cfb182e19ca8d251e8951efccdb837d2b..33308ef4a6e3132e02e7d347b32d799c167aab0a 100644 --- a/Core/NosSmooth.PacketSerializersGenerator/PacketConverterGenerator.cs +++ b/Packets/NosSmooth.PacketSerializersGenerator/PacketConverterGenerator.cs @@ -50,9 +50,8 @@ public class PacketConverterGenerator #pragma warning disable 1591 using {_packetInfo.Namespace}; -using NosSmooth.Packets.Converters; -using NosSmooth.Packets.Errors; -using NosSmooth.Packets; +using NosSmooth.PacketSerializer.Abstractions.Errors; +using NosSmooth.PacketSerializer.Abstractions; using Remora.Results; {usingsString} diff --git a/Core/NosSmooth.PacketSerializersGenerator/ParameterChecker.cs b/Packets/NosSmooth.PacketSerializersGenerator/ParameterChecker.cs similarity index 100% rename from Core/NosSmooth.PacketSerializersGenerator/ParameterChecker.cs rename to Packets/NosSmooth.PacketSerializersGenerator/ParameterChecker.cs diff --git a/Core/NosSmooth.PacketSerializersGenerator/SourceGenerator.cs b/Packets/NosSmooth.PacketSerializersGenerator/SourceGenerator.cs similarity index 98% rename from Core/NosSmooth.PacketSerializersGenerator/SourceGenerator.cs rename to Packets/NosSmooth.PacketSerializersGenerator/SourceGenerator.cs index b220effe473e134f3ee6ff84604b4779e922972d..24802776a5a9721def53168c15a1cf984d6a9cf6 100644 --- a/Core/NosSmooth.PacketSerializersGenerator/SourceGenerator.cs +++ b/Packets/NosSmooth.PacketSerializersGenerator/SourceGenerator.cs @@ -64,7 +64,7 @@ public class SourceGenerator : ISourceGenerator /// public void Initialize(GeneratorInitializationContext context) { - // SpinWait.SpinUntil(() => Debugger.IsAttached); + SpinWait.SpinUntil(() => Debugger.IsAttached); } private IEnumerable GetPacketRecords(Compilation compilation, SyntaxTree tree) @@ -156,9 +156,8 @@ public class SourceGenerator : ISourceGenerator using System.Collections; using System.Collections.Generic; -using NosSmooth.Packets.Converters; -using NosSmooth.Packets.Errors; -using NosSmooth.Packets; +using NosSmooth.PacketSerializer.Abstractions; +using NosSmooth.PacketSerializer.Abstractions.Errors; using Remora.Results; namespace NosSmooth.Generated; diff --git a/Core/NosSmooth.Packets/Packets/Client/Battle/NcifPacket.cs b/Packets/NosSmooth.Packets/Client/Battle/NcifPacket.cs similarity index 87% rename from Core/NosSmooth.Packets/Packets/Client/Battle/NcifPacket.cs rename to Packets/NosSmooth.Packets/Client/Battle/NcifPacket.cs index 0d543ddf0683037608fc1746e57d118d7bdcbfb6..f9b034064d061fe9f6d30653c400e1923ba44055 100644 --- a/Core/NosSmooth.Packets/Packets/Client/Battle/NcifPacket.cs +++ b/Packets/NosSmooth.Packets/Client/Battle/NcifPacket.cs @@ -4,10 +4,10 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; using NosSmooth.Packets.Enums; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Client.Battle; +namespace NosSmooth.Packets.Client.Battle; /// /// Client sends this when focusing an entity and then every x seconds again. diff --git a/Core/NosSmooth.Packets/Packets/Client/Battle/UseAOESkillPacket.cs b/Packets/NosSmooth.Packets/Client/Battle/UseAOESkillPacket.cs similarity index 87% rename from Core/NosSmooth.Packets/Packets/Client/Battle/UseAOESkillPacket.cs rename to Packets/NosSmooth.Packets/Client/Battle/UseAOESkillPacket.cs index 7dbb13e261e97a787f0c12b3fb87206d4bf9f50e..97e32359b3e126a663caf14a9f18c140d96f6236 100644 --- a/Core/NosSmooth.Packets/Packets/Client/Battle/UseAOESkillPacket.cs +++ b/Packets/NosSmooth.Packets/Client/Battle/UseAOESkillPacket.cs @@ -4,9 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Client.Battle; +namespace NosSmooth.Packets.Client.Battle; /// /// Sent to use a skill that is targeted at position. diff --git a/Core/NosSmooth.Packets/Packets/Client/Battle/UseSkillPacket.cs b/Packets/NosSmooth.Packets/Client/Battle/UseSkillPacket.cs similarity index 87% rename from Core/NosSmooth.Packets/Packets/Client/Battle/UseSkillPacket.cs rename to Packets/NosSmooth.Packets/Client/Battle/UseSkillPacket.cs index e3cb23affbce3e0ef02da49cb241631f1323ff4a..97ce09391231883217c063c5b120bd6906118d81 100644 --- a/Core/NosSmooth.Packets/Packets/Client/Battle/UseSkillPacket.cs +++ b/Packets/NosSmooth.Packets/Client/Battle/UseSkillPacket.cs @@ -4,10 +4,10 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; using NosSmooth.Packets.Enums; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Client.Battle; +namespace NosSmooth.Packets.Client.Battle; /// /// Sent to use regular skill. diff --git a/Core/NosSmooth.Packets/Packets/Client/Chat/SayPacket.cs b/Packets/NosSmooth.Packets/Client/Chat/SayPacket.cs similarity index 82% rename from Core/NosSmooth.Packets/Packets/Client/Chat/SayPacket.cs rename to Packets/NosSmooth.Packets/Client/Chat/SayPacket.cs index 8ff35e1c39ed81f27b37b46b90e60fb2d64dd58f..17f52f28722f9daed5996e0b914cc681a357e8e6 100644 --- a/Core/NosSmooth.Packets/Packets/Client/Chat/SayPacket.cs +++ b/Packets/NosSmooth.Packets/Client/Chat/SayPacket.cs @@ -4,9 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Client.Chat; +namespace NosSmooth.Packets.Client.Chat; /// /// Sends a message to the map chat. diff --git a/Core/NosSmooth.Packets/Packets/Client/Misc/PulsePacket.cs b/Packets/NosSmooth.Packets/Client/Misc/PulsePacket.cs similarity index 87% rename from Core/NosSmooth.Packets/Packets/Client/Misc/PulsePacket.cs rename to Packets/NosSmooth.Packets/Client/Misc/PulsePacket.cs index 1f36ef9199c6f7cc0ee2639cd2ffc80e601bf7ea..cecd5242b04f576e6bd5229f5b6a738f26fe8930 100644 --- a/Core/NosSmooth.Packets/Packets/Client/Misc/PulsePacket.cs +++ b/Packets/NosSmooth.Packets/Client/Misc/PulsePacket.cs @@ -4,9 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Client.Misc; +namespace NosSmooth.Packets.Client.Misc; /// /// Heartbeat packet. diff --git a/Core/NosSmooth.Packets/Packets/Client/Movement/WalkPacket.cs b/Packets/NosSmooth.Packets/Client/Movement/WalkPacket.cs similarity index 90% rename from Core/NosSmooth.Packets/Packets/Client/Movement/WalkPacket.cs rename to Packets/NosSmooth.Packets/Client/Movement/WalkPacket.cs index 0d17a08bfb080474469e91752ea6cd8596bf2476..a0e8093988502602755fdc04314786adbb8ffb05 100644 --- a/Core/NosSmooth.Packets/Packets/Client/Movement/WalkPacket.cs +++ b/Packets/NosSmooth.Packets/Client/Movement/WalkPacket.cs @@ -4,9 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Client.Movement; +namespace NosSmooth.Packets.Client.Movement; /// /// Packet sent when moving. diff --git a/Core/NosSmooth.Packets/Enums/Act4Mode.cs b/Packets/NosSmooth.Packets/Enums/Act4Mode.cs similarity index 100% rename from Core/NosSmooth.Packets/Enums/Act4Mode.cs rename to Packets/NosSmooth.Packets/Enums/Act4Mode.cs diff --git a/Core/NosSmooth.Packets/Enums/Chat/MessageType.cs b/Packets/NosSmooth.Packets/Enums/Chat/MessageType.cs similarity index 100% rename from Core/NosSmooth.Packets/Enums/Chat/MessageType.cs rename to Packets/NosSmooth.Packets/Enums/Chat/MessageType.cs diff --git a/Core/NosSmooth.Packets/Enums/Chat/SayColor.cs b/Packets/NosSmooth.Packets/Enums/Chat/SayColor.cs similarity index 100% rename from Core/NosSmooth.Packets/Enums/Chat/SayColor.cs rename to Packets/NosSmooth.Packets/Enums/Chat/SayColor.cs diff --git a/Core/NosSmooth.Packets/Enums/Element.cs b/Packets/NosSmooth.Packets/Enums/Element.cs similarity index 100% rename from Core/NosSmooth.Packets/Enums/Element.cs rename to Packets/NosSmooth.Packets/Enums/Element.cs diff --git a/Core/NosSmooth.Packets/Enums/Entities/EntityType.cs b/Packets/NosSmooth.Packets/Enums/Entities/EntityType.cs similarity index 100% rename from Core/NosSmooth.Packets/Enums/Entities/EntityType.cs rename to Packets/NosSmooth.Packets/Enums/Entities/EntityType.cs diff --git a/Core/NosSmooth.Packets/Enums/Entities/FactionType.cs b/Packets/NosSmooth.Packets/Enums/Entities/FactionType.cs similarity index 100% rename from Core/NosSmooth.Packets/Enums/Entities/FactionType.cs rename to Packets/NosSmooth.Packets/Enums/Entities/FactionType.cs diff --git a/Core/NosSmooth.Packets/Enums/Entities/SpawnEffect.cs b/Packets/NosSmooth.Packets/Enums/Entities/SpawnEffect.cs similarity index 100% rename from Core/NosSmooth.Packets/Enums/Entities/SpawnEffect.cs rename to Packets/NosSmooth.Packets/Enums/Entities/SpawnEffect.cs diff --git a/Core/NosSmooth.Packets/Enums/Players/AuthorityType.cs b/Packets/NosSmooth.Packets/Enums/Players/AuthorityType.cs similarity index 100% rename from Core/NosSmooth.Packets/Enums/Players/AuthorityType.cs rename to Packets/NosSmooth.Packets/Enums/Players/AuthorityType.cs diff --git a/Core/NosSmooth.Packets/Enums/Players/HairColor.cs b/Packets/NosSmooth.Packets/Enums/Players/HairColor.cs similarity index 100% rename from Core/NosSmooth.Packets/Enums/Players/HairColor.cs rename to Packets/NosSmooth.Packets/Enums/Players/HairColor.cs diff --git a/Core/NosSmooth.Packets/Enums/Players/HairStyle.cs b/Packets/NosSmooth.Packets/Enums/Players/HairStyle.cs similarity index 100% rename from Core/NosSmooth.Packets/Enums/Players/HairStyle.cs rename to Packets/NosSmooth.Packets/Enums/Players/HairStyle.cs diff --git a/Core/NosSmooth.Packets/Enums/Players/PlayerClass.cs b/Packets/NosSmooth.Packets/Enums/Players/PlayerClass.cs similarity index 100% rename from Core/NosSmooth.Packets/Enums/Players/PlayerClass.cs rename to Packets/NosSmooth.Packets/Enums/Players/PlayerClass.cs diff --git a/Core/NosSmooth.Packets/Enums/Players/SexType.cs b/Packets/NosSmooth.Packets/Enums/Players/SexType.cs similarity index 100% rename from Core/NosSmooth.Packets/Enums/Players/SexType.cs rename to Packets/NosSmooth.Packets/Enums/Players/SexType.cs diff --git a/Core/NosSmooth.Packets/Packets/IPacket.cs b/Packets/NosSmooth.Packets/IPacket.cs similarity index 89% rename from Core/NosSmooth.Packets/Packets/IPacket.cs rename to Packets/NosSmooth.Packets/IPacket.cs index 64b3537a5a33b5706e475c63addfe61b4b9fe837..55c892f6526b448da8f7dde5b0cda4800d3f3db7 100644 --- a/Core/NosSmooth.Packets/Packets/IPacket.cs +++ b/Packets/NosSmooth.Packets/IPacket.cs @@ -4,7 +4,7 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace NosSmooth.Packets.Packets; +namespace NosSmooth.Packets; /// /// Base packet interface that must be implemented in every packet. diff --git a/Packets/NosSmooth.Packets/IsExternalInit.cs b/Packets/NosSmooth.Packets/IsExternalInit.cs new file mode 100644 index 0000000000000000000000000000000000000000..7c63200cfae2cfd2a9607d18344f77c095a28e9d --- /dev/null +++ b/Packets/NosSmooth.Packets/IsExternalInit.cs @@ -0,0 +1,15 @@ +// +// IsExternalInit.cs +// +// Copyright (c) František Boháček. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +namespace System.Runtime.CompilerServices +{ + /// + /// Dummy. + /// + public class IsExternalInit + { + } +} \ No newline at end of file diff --git a/Packets/NosSmooth.Packets/NosSmooth.Packets.csproj b/Packets/NosSmooth.Packets/NosSmooth.Packets.csproj new file mode 100644 index 0000000000000000000000000000000000000000..aed6c624c95a64ea143dedbb64dca02e1965d4a4 --- /dev/null +++ b/Packets/NosSmooth.Packets/NosSmooth.Packets.csproj @@ -0,0 +1,17 @@ + + + + enable + enable + netstandard2.1 + 10 + + + + + + + + + + diff --git a/Core/NosSmooth.Packets/Packets/Server/Act4/FcPacket.cs b/Packets/NosSmooth.Packets/Server/Act4/FcPacket.cs similarity index 92% rename from Core/NosSmooth.Packets/Packets/Server/Act4/FcPacket.cs rename to Packets/NosSmooth.Packets/Server/Act4/FcPacket.cs index 6ead6f0e5009858174e23e14a54e922c19b7b601..d76f603e49e1bfbc9ba07e759765c0db163ae58e 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Act4/FcPacket.cs +++ b/Packets/NosSmooth.Packets/Server/Act4/FcPacket.cs @@ -4,10 +4,10 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; using NosSmooth.Packets.Enums; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Server.Act4; +namespace NosSmooth.Packets.Server.Act4; /// /// Contains the state of the act4. diff --git a/Core/NosSmooth.Packets/Packets/Server/Act4/FcSubPacket.cs b/Packets/NosSmooth.Packets/Server/Act4/FcSubPacket.cs similarity index 93% rename from Core/NosSmooth.Packets/Packets/Server/Act4/FcSubPacket.cs rename to Packets/NosSmooth.Packets/Server/Act4/FcSubPacket.cs index 943e7f8315ca6df7d3c3f9173a83b3ba3316cce5..70f413ba1428d6fc584ce05bb7af22a8c5f4f4b0 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Act4/FcSubPacket.cs +++ b/Packets/NosSmooth.Packets/Server/Act4/FcSubPacket.cs @@ -4,10 +4,10 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; using NosSmooth.Packets.Enums; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Server.Act4; +namespace NosSmooth.Packets.Server.Act4; /// /// Sub packet of , containing diff --git a/Core/NosSmooth.Packets/Packets/Server/Chat/MsgPacket.cs b/Packets/NosSmooth.Packets/Server/Chat/MsgPacket.cs similarity index 86% rename from Core/NosSmooth.Packets/Packets/Server/Chat/MsgPacket.cs rename to Packets/NosSmooth.Packets/Server/Chat/MsgPacket.cs index 1e27650705a476e16d9d20c5b598009bb08afdfd..5ccc9d3e82d3adb572c30be07748238443ea777a 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Chat/MsgPacket.cs +++ b/Packets/NosSmooth.Packets/Server/Chat/MsgPacket.cs @@ -4,10 +4,10 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; using NosSmooth.Packets.Enums.Chat; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Server.Chat; +namespace NosSmooth.Packets.Server.Chat; /// /// Contains message that was sent in chat, shouted etc. diff --git a/Core/NosSmooth.Packets/Packets/Server/Chat/SayPacket.cs b/Packets/NosSmooth.Packets/Server/Chat/SayPacket.cs similarity index 89% rename from Core/NosSmooth.Packets/Packets/Server/Chat/SayPacket.cs rename to Packets/NosSmooth.Packets/Server/Chat/SayPacket.cs index aa00e6850d5e4450301443a2bdea5150aa8326bf..2441e86ffa8252b6fea4304eda4a92a2d020569b 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Chat/SayPacket.cs +++ b/Packets/NosSmooth.Packets/Server/Chat/SayPacket.cs @@ -4,11 +4,11 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; using NosSmooth.Packets.Enums; using NosSmooth.Packets.Enums.Chat; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Server.Chat; +namespace NosSmooth.Packets.Server.Chat; /// /// Sent when someone says something. diff --git a/Core/NosSmooth.Packets/Packets/Server/Entities/InEquipmentSubPacket.cs b/Packets/NosSmooth.Packets/Server/Entities/InEquipmentSubPacket.cs similarity index 93% rename from Core/NosSmooth.Packets/Packets/Server/Entities/InEquipmentSubPacket.cs rename to Packets/NosSmooth.Packets/Server/Entities/InEquipmentSubPacket.cs index 0203d72227513031b85dd2021f8053b2c94b4aa2..c8685f922f7626a4c5dade685b630fce7fcdebbd 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Entities/InEquipmentSubPacket.cs +++ b/Packets/NosSmooth.Packets/Server/Entities/InEquipmentSubPacket.cs @@ -4,9 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Server.Entities; +namespace NosSmooth.Packets.Server.Entities; /// /// Sub packet of present if the in packet diff --git a/Core/NosSmooth.Packets/Packets/Server/Entities/InItemSubPacket.cs b/Packets/NosSmooth.Packets/Server/Entities/InItemSubPacket.cs similarity index 88% rename from Core/NosSmooth.Packets/Packets/Server/Entities/InItemSubPacket.cs rename to Packets/NosSmooth.Packets/Server/Entities/InItemSubPacket.cs index fb50954fd3ccb3885443360e75b4155a49df52fc..287c2df676542b05043567cc00c39fe48e0c8559 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Entities/InItemSubPacket.cs +++ b/Packets/NosSmooth.Packets/Server/Entities/InItemSubPacket.cs @@ -4,9 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Server.Entities; +namespace NosSmooth.Packets.Server.Entities; /// /// Sub packet of present if the in packet diff --git a/Core/NosSmooth.Packets/Packets/Server/Entities/InNonPlayerSubPacket.cs b/Packets/NosSmooth.Packets/Server/Entities/InNonPlayerSubPacket.cs similarity index 94% rename from Core/NosSmooth.Packets/Packets/Server/Entities/InNonPlayerSubPacket.cs rename to Packets/NosSmooth.Packets/Server/Entities/InNonPlayerSubPacket.cs index 77c4bcb42f7ecd00d53d0b5c2d1689890b6300e4..547a850c18bd3b420390db73be43e77aa6d2a4ac 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Entities/InNonPlayerSubPacket.cs +++ b/Packets/NosSmooth.Packets/Server/Entities/InNonPlayerSubPacket.cs @@ -4,12 +4,12 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; -using NosSmooth.Packets.Common; using NosSmooth.Packets.Enums; using NosSmooth.Packets.Enums.Entities; +using NosSmooth.PacketSerializer.Abstractions.Attributes; +using NosSmooth.PacketSerializer.Abstractions.Common; -namespace NosSmooth.Packets.Packets.Server.Entities; +namespace NosSmooth.Packets.Server.Entities; /// /// Sub packet of present if the in packet diff --git a/Core/NosSmooth.Packets/Packets/Server/Entities/InPacket.cs b/Packets/NosSmooth.Packets/Server/Entities/InPacket.cs similarity index 93% rename from Core/NosSmooth.Packets/Packets/Server/Entities/InPacket.cs rename to Packets/NosSmooth.Packets/Server/Entities/InPacket.cs index a41c41a64c879f3fc974186349bd557a1852470f..87e6f9e36a4eb876bb227d05f7153c08e9802771 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Entities/InPacket.cs +++ b/Packets/NosSmooth.Packets/Server/Entities/InPacket.cs @@ -4,11 +4,11 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; -using NosSmooth.Packets.Common; using NosSmooth.Packets.Enums; +using NosSmooth.PacketSerializer.Abstractions.Attributes; +using NosSmooth.PacketSerializer.Abstractions.Common; -namespace NosSmooth.Packets.Packets.Server.Entities; +namespace NosSmooth.Packets.Server.Entities; /// /// There is a new entity on the map present. diff --git a/Core/NosSmooth.Packets/Packets/Server/Entities/InPlayerSubPacket.cs b/Packets/NosSmooth.Packets/Server/Entities/InPlayerSubPacket.cs similarity index 95% rename from Core/NosSmooth.Packets/Packets/Server/Entities/InPlayerSubPacket.cs rename to Packets/NosSmooth.Packets/Server/Entities/InPlayerSubPacket.cs index d46d60428ec2a3a0c68aa0cdf929b29f15748fed..319b255da72b6d0d2c151801306b8badbda6c4dc 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Entities/InPlayerSubPacket.cs +++ b/Packets/NosSmooth.Packets/Server/Entities/InPlayerSubPacket.cs @@ -4,14 +4,13 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System.Collections.Generic; -using NosSmooth.Packets.Attributes; using NosSmooth.Packets.Enums; using NosSmooth.Packets.Enums.Players; -using NosSmooth.Packets.Packets.Server.Players; -using NosSmooth.Packets.Packets.Server.Weapons; +using NosSmooth.Packets.Server.Players; +using NosSmooth.Packets.Server.Weapons; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Server.Entities; +namespace NosSmooth.Packets.Server.Entities; /// /// Sub packet for diff --git a/Core/NosSmooth.Packets/Packets/Server/Entities/MovePacket.cs b/Packets/NosSmooth.Packets/Server/Entities/MovePacket.cs similarity index 90% rename from Core/NosSmooth.Packets/Packets/Server/Entities/MovePacket.cs rename to Packets/NosSmooth.Packets/Server/Entities/MovePacket.cs index be5f84f640e625dae2f0d9a4acd2d00da7f1d801..858b176cb0a1bdb54c40981ae8196c832098f2ac 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Entities/MovePacket.cs +++ b/Packets/NosSmooth.Packets/Server/Entities/MovePacket.cs @@ -4,10 +4,10 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; using NosSmooth.Packets.Enums; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Server.Entities; +namespace NosSmooth.Packets.Server.Entities; /// /// The entity has moved to the given position. diff --git a/Core/NosSmooth.Packets/Packets/Server/Entities/StPacket.cs b/Packets/NosSmooth.Packets/Server/Entities/StPacket.cs similarity index 91% rename from Core/NosSmooth.Packets/Packets/Server/Entities/StPacket.cs rename to Packets/NosSmooth.Packets/Server/Entities/StPacket.cs index 1dc6edef36addd1f43b522f02177a2d1bb4e605a..620cd7cc9737b44afda839a2fd74e8bc32123ce0 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Entities/StPacket.cs +++ b/Packets/NosSmooth.Packets/Server/Entities/StPacket.cs @@ -4,11 +4,10 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System.Collections.Generic; -using NosSmooth.Packets.Attributes; using NosSmooth.Packets.Enums; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Server.Entities; +namespace NosSmooth.Packets.Server.Entities; /// /// Sent as a response to "ncif" packet. diff --git a/Core/NosSmooth.Packets/Packets/Server/Entities/StatPacket.cs b/Packets/NosSmooth.Packets/Server/Entities/StatPacket.cs similarity index 89% rename from Core/NosSmooth.Packets/Packets/Server/Entities/StatPacket.cs rename to Packets/NosSmooth.Packets/Server/Entities/StatPacket.cs index 88210105430235c7975a332f3e4b2fa1ebc79833..c92dbbbd6f899c030a96d989851edf805a70cdad 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Entities/StatPacket.cs +++ b/Packets/NosSmooth.Packets/Server/Entities/StatPacket.cs @@ -4,9 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Server.Entities; +namespace NosSmooth.Packets.Server.Entities; /// /// Sent when player takes damage, heals or changes options. diff --git a/Core/NosSmooth.Packets/Packets/Server/Groups/PinitPacket.cs b/Packets/NosSmooth.Packets/Server/Groups/PinitPacket.cs similarity index 86% rename from Core/NosSmooth.Packets/Packets/Server/Groups/PinitPacket.cs rename to Packets/NosSmooth.Packets/Server/Groups/PinitPacket.cs index 18e1aed8cbe93bd30f7cd52f93ab3333038b12d6..7d765bf35cc8591a922cbef74ca5f798bcb6d6f3 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Groups/PinitPacket.cs +++ b/Packets/NosSmooth.Packets/Server/Groups/PinitPacket.cs @@ -4,10 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System.Collections.Generic; -using NosSmooth.Packets.Attributes; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Server.Groups; +namespace NosSmooth.Packets.Server.Groups; /// /// Sent for initialization of pets and groups. diff --git a/Core/NosSmooth.Packets/Packets/Server/Groups/PinitSubPacket.cs b/Packets/NosSmooth.Packets/Server/Groups/PinitSubPacket.cs similarity index 92% rename from Core/NosSmooth.Packets/Packets/Server/Groups/PinitSubPacket.cs rename to Packets/NosSmooth.Packets/Server/Groups/PinitSubPacket.cs index 2b72f2ec998f4c673fa62ecf7d6bd0b99174e2db..f386f605df79299e9c1ca8e1da58f0673ed64415 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Groups/PinitSubPacket.cs +++ b/Packets/NosSmooth.Packets/Server/Groups/PinitSubPacket.cs @@ -4,11 +4,11 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; -using NosSmooth.Packets.Common; using NosSmooth.Packets.Enums; +using NosSmooth.PacketSerializer.Abstractions.Attributes; +using NosSmooth.PacketSerializer.Abstractions.Common; -namespace NosSmooth.Packets.Packets.Server.Groups; +namespace NosSmooth.Packets.Server.Groups; /// /// Sub packet of containing information diff --git a/Core/NosSmooth.Packets/Packets/Server/Maps/CMapPacket.cs b/Packets/NosSmooth.Packets/Server/Maps/CMapPacket.cs similarity index 86% rename from Core/NosSmooth.Packets/Packets/Server/Maps/CMapPacket.cs rename to Packets/NosSmooth.Packets/Server/Maps/CMapPacket.cs index 20cb0b22aff2cbe38682fa56a951d80fed08568b..3913b067b0d648d4a2182e7f115ade0332cf0ec7 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Maps/CMapPacket.cs +++ b/Packets/NosSmooth.Packets/Server/Maps/CMapPacket.cs @@ -4,9 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Server.Maps; +namespace NosSmooth.Packets.Server.Maps; /// /// Packet sent when map is changed. diff --git a/Core/NosSmooth.Packets/Packets/Server/Players/CInfoPacket.cs b/Packets/NosSmooth.Packets/Server/Players/CInfoPacket.cs similarity index 78% rename from Core/NosSmooth.Packets/Packets/Server/Players/CInfoPacket.cs rename to Packets/NosSmooth.Packets/Server/Players/CInfoPacket.cs index 2d7d209a14b9962980f6489875c2d914cfa6ac7f..ce3e8adbc94156f8a2d13d324fe5dc8cdd19ae5f 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Players/CInfoPacket.cs +++ b/Packets/NosSmooth.Packets/Server/Players/CInfoPacket.cs @@ -4,9 +4,7 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; - -namespace NosSmooth.Packets.Packets.Server.Players; +namespace NosSmooth.Packets.Server.Players; /// /// Character information. diff --git a/Core/NosSmooth.Packets/Packets/Server/Players/CModePacket.cs b/Packets/NosSmooth.Packets/Server/Players/CModePacket.cs similarity index 92% rename from Core/NosSmooth.Packets/Packets/Server/Players/CModePacket.cs rename to Packets/NosSmooth.Packets/Server/Players/CModePacket.cs index 990e9ff0ad600ee9200d6e187914b6048c776315..ecb099bc98e59ea2d55c6e425b04278334dc6c93 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Players/CModePacket.cs +++ b/Packets/NosSmooth.Packets/Server/Players/CModePacket.cs @@ -4,10 +4,10 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; using NosSmooth.Packets.Enums; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Server.Players; +namespace NosSmooth.Packets.Server.Players; /// /// TODO diff --git a/Core/NosSmooth.Packets/Packets/Server/Players/FamilySubPacket.cs b/Packets/NosSmooth.Packets/Server/Players/FamilySubPacket.cs similarity index 85% rename from Core/NosSmooth.Packets/Packets/Server/Players/FamilySubPacket.cs rename to Packets/NosSmooth.Packets/Server/Players/FamilySubPacket.cs index 104e4ae36ae5e041dd8f3dbe5330539c825d9089..0deb9b33dcdf1a93ac10fca8f1c2192112c02d57 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Players/FamilySubPacket.cs +++ b/Packets/NosSmooth.Packets/Server/Players/FamilySubPacket.cs @@ -4,9 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Server.Players; +namespace NosSmooth.Packets.Server.Players; /// /// Sub packet with family information. diff --git a/Core/NosSmooth.Packets/Packets/Server/Players/LevPacket.cs b/Packets/NosSmooth.Packets/Server/Players/LevPacket.cs similarity index 93% rename from Core/NosSmooth.Packets/Packets/Server/Players/LevPacket.cs rename to Packets/NosSmooth.Packets/Server/Players/LevPacket.cs index 2964c077bc02126fc1eb52c569514809e5d08b4e..28ca36843cdad4913bbc8e97b169ec063cf31ffb 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Players/LevPacket.cs +++ b/Packets/NosSmooth.Packets/Server/Players/LevPacket.cs @@ -4,9 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Server.Players; +namespace NosSmooth.Packets.Server.Players; /// /// Sent on map change. diff --git a/Core/NosSmooth.Packets/Packets/Server/Skills/SkiPacket.cs b/Packets/NosSmooth.Packets/Server/Skills/SkiPacket.cs similarity index 85% rename from Core/NosSmooth.Packets/Packets/Server/Skills/SkiPacket.cs rename to Packets/NosSmooth.Packets/Server/Skills/SkiPacket.cs index 257e980b298c79bf027ef6238f05dee5be2c1d72..e5c7064f64faaec80d0017d1a1546837d608ba0d 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Skills/SkiPacket.cs +++ b/Packets/NosSmooth.Packets/Server/Skills/SkiPacket.cs @@ -4,11 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System.Collections.Generic; -using System.ComponentModel; -using NosSmooth.Packets.Attributes; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Server.Skills; +namespace NosSmooth.Packets.Server.Skills; /// /// Information about skills, sent when changing sp, map etc. diff --git a/Core/NosSmooth.Packets/Packets/Server/Skills/SkiSubPacket.cs b/Packets/NosSmooth.Packets/Server/Skills/SkiSubPacket.cs similarity index 85% rename from Core/NosSmooth.Packets/Packets/Server/Skills/SkiSubPacket.cs rename to Packets/NosSmooth.Packets/Server/Skills/SkiSubPacket.cs index 6685a22a42d6a9cb467b76f3a77d869365604b88..c6ef61eec865d3fb155fc4bb58a63efa0789e157 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Skills/SkiSubPacket.cs +++ b/Packets/NosSmooth.Packets/Server/Skills/SkiSubPacket.cs @@ -4,9 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Server.Skills; +namespace NosSmooth.Packets.Server.Skills; /// /// Sub packet for containing information about a skill. diff --git a/Core/NosSmooth.Packets/Packets/Server/Skills/SrPacket.cs b/Packets/NosSmooth.Packets/Server/Skills/SrPacket.cs similarity index 85% rename from Core/NosSmooth.Packets/Packets/Server/Skills/SrPacket.cs rename to Packets/NosSmooth.Packets/Server/Skills/SrPacket.cs index 9f67a6f83b2d9bc4964e7cc46ded61678b8b3012..f5296a941e2c3824d6afd03d0e305827dade8b73 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Skills/SrPacket.cs +++ b/Packets/NosSmooth.Packets/Server/Skills/SrPacket.cs @@ -4,10 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System.CodeDom.Compiler; -using NosSmooth.Packets.Attributes; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Server.Skills; +namespace NosSmooth.Packets.Server.Skills; /// /// Skill cooldown reset. diff --git a/Core/NosSmooth.Packets/Packets/Server/Weapons/UpgradeRareSubPacket.cs b/Packets/NosSmooth.Packets/Server/Weapons/UpgradeRareSubPacket.cs similarity index 83% rename from Core/NosSmooth.Packets/Packets/Server/Weapons/UpgradeRareSubPacket.cs rename to Packets/NosSmooth.Packets/Server/Weapons/UpgradeRareSubPacket.cs index 0812af55532d0b503a857c3478af86ea137f6484..f6a57f01decae8fe499a574f89923d6952d542a6 100644 --- a/Core/NosSmooth.Packets/Packets/Server/Weapons/UpgradeRareSubPacket.cs +++ b/Packets/NosSmooth.Packets/Server/Weapons/UpgradeRareSubPacket.cs @@ -4,9 +4,9 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using NosSmooth.Packets.Attributes; +using NosSmooth.PacketSerializer.Abstractions.Attributes; -namespace NosSmooth.Packets.Packets.Server.Weapons; +namespace NosSmooth.Packets.Server.Weapons; /// /// Upgrade and rare of a weapon or an armor. diff --git a/Core/NosSmooth.Packets/Packets/UnresolvedPacket.cs b/Packets/NosSmooth.Packets/UnresolvedPacket.cs similarity index 92% rename from Core/NosSmooth.Packets/Packets/UnresolvedPacket.cs rename to Packets/NosSmooth.Packets/UnresolvedPacket.cs index fc2b6cc16068a83ccdec0626d971667196176170..1e6d38520117f2ded32375c725c4dfaa62146656 100644 --- a/Core/NosSmooth.Packets/Packets/UnresolvedPacket.cs +++ b/Packets/NosSmooth.Packets/UnresolvedPacket.cs @@ -4,7 +4,7 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -namespace NosSmooth.Packets.Packets; +namespace NosSmooth.Packets; /// /// Unresolved packet that is not supported. diff --git a/Tests/NosSmooth.Packets.Tests/Converters/Packets/FcPacketConverterTests.cs b/Tests/NosSmooth.Packets.Tests/Converters/Packets/FcPacketConverterTests.cs index a6322cd97731132a8f4bfa10963c73c270829240..9507d10354863f9bcd6402f1bacf11cef571cc66 100644 --- a/Tests/NosSmooth.Packets.Tests/Converters/Packets/FcPacketConverterTests.cs +++ b/Tests/NosSmooth.Packets.Tests/Converters/Packets/FcPacketConverterTests.cs @@ -5,11 +5,10 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.Extensions.DependencyInjection; -using NosSmooth.Packets.Attributes; -using NosSmooth.Packets.Converters; using NosSmooth.Packets.Enums; using NosSmooth.Packets.Extensions; -using NosSmooth.Packets.Packets.Server.Act4; +using NosSmooth.Packets.Server.Act4; +using NosSmooth.PacketSerializer.Abstractions.Attributes; using Xunit; namespace NosSmooth.Packets.Tests.Converters.Packets; diff --git a/Tests/NosSmooth.Packets.Tests/Converters/Packets/InPacketConverterTests.cs b/Tests/NosSmooth.Packets.Tests/Converters/Packets/InPacketConverterTests.cs index edd2d21d8cbc9a92d35508f6fe122c3eadab7cb7..66ff5cf5795f29433ba205e33851a6c14e462869 100644 --- a/Tests/NosSmooth.Packets.Tests/Converters/Packets/InPacketConverterTests.cs +++ b/Tests/NosSmooth.Packets.Tests/Converters/Packets/InPacketConverterTests.cs @@ -4,19 +4,16 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; using System.Collections.Generic; using Microsoft.Extensions.DependencyInjection; -using NosSmooth.Packets.Attributes; -using NosSmooth.Packets.Converters; using NosSmooth.Packets.Enums; using NosSmooth.Packets.Enums.Entities; using NosSmooth.Packets.Enums.Players; using NosSmooth.Packets.Extensions; -using NosSmooth.Packets.Packets.Server.Entities; -using NosSmooth.Packets.Packets.Server.Players; -using NosSmooth.Packets.Packets.Server.Skills; -using NosSmooth.Packets.Packets.Server.Weapons; +using NosSmooth.Packets.Server.Entities; +using NosSmooth.Packets.Server.Players; +using NosSmooth.Packets.Server.Weapons; +using NosSmooth.PacketSerializer.Abstractions.Attributes; using Xunit; namespace NosSmooth.Packets.Tests.Converters.Packets; @@ -91,7 +88,7 @@ public class InPacketConverterTests 0, new UpgradeRareSubPacket(10, 8), new UpgradeRareSubPacket(10, 8), - new FamilySubPacket("-1", null), + new FamilySubPacket(null, null), null, "26", false, @@ -222,7 +219,7 @@ public class InPacketConverterTests -1, null, "0", - "-1", + null, "0", 0, 0, @@ -271,7 +268,7 @@ public class InPacketConverterTests -1, null, "0", - "-1", + null, "0", 0, 0, diff --git a/Tests/NosSmooth.Packets.Tests/Converters/Packets/MovePacketConverterTests.cs b/Tests/NosSmooth.Packets.Tests/Converters/Packets/MovePacketConverterTests.cs index 7d2c737b07e4b9cfc99bc2f4d8d2c2f75b7f0f39..50b98026ed9c270a39cbfd44f1d9f1de6054059f 100644 --- a/Tests/NosSmooth.Packets.Tests/Converters/Packets/MovePacketConverterTests.cs +++ b/Tests/NosSmooth.Packets.Tests/Converters/Packets/MovePacketConverterTests.cs @@ -5,11 +5,10 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.Extensions.DependencyInjection; -using NosSmooth.Packets.Attributes; -using NosSmooth.Packets.Converters; using NosSmooth.Packets.Enums; using NosSmooth.Packets.Extensions; -using NosSmooth.Packets.Packets.Server.Entities; +using NosSmooth.Packets.Server.Entities; +using NosSmooth.PacketSerializer.Abstractions.Attributes; using Xunit; namespace NosSmooth.Packets.Tests.Converters.Packets; diff --git a/Tests/NosSmooth.Packets.Tests/Converters/Packets/PinitPacketConverterTest.cs b/Tests/NosSmooth.Packets.Tests/Converters/Packets/PinitPacketConverterTest.cs index 46444faa6d537c267eb1d4b8f1ac7a583e26543c..28f53f339ae77153aa84634a49afb37c203ac5ef 100644 --- a/Tests/NosSmooth.Packets.Tests/Converters/Packets/PinitPacketConverterTest.cs +++ b/Tests/NosSmooth.Packets.Tests/Converters/Packets/PinitPacketConverterTest.cs @@ -5,11 +5,10 @@ // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.Extensions.DependencyInjection; -using NosSmooth.Packets.Attributes; -using NosSmooth.Packets.Converters; using NosSmooth.Packets.Enums; using NosSmooth.Packets.Extensions; -using NosSmooth.Packets.Packets.Server.Groups; +using NosSmooth.Packets.Server.Groups; +using NosSmooth.PacketSerializer.Abstractions.Attributes; using Xunit; namespace NosSmooth.Packets.Tests.Converters.Packets; diff --git a/Tests/NosSmooth.Packets.Tests/NosSmooth.Packets.Tests.csproj b/Tests/NosSmooth.Packets.Tests/NosSmooth.Packets.Tests.csproj index 1dcab1d7aec78d906e61c5796bfed7cec20c34a1..a14a9eb74360d2da4641d3ac0d82a0589a0a6d05 100644 --- a/Tests/NosSmooth.Packets.Tests/NosSmooth.Packets.Tests.csproj +++ b/Tests/NosSmooth.Packets.Tests/NosSmooth.Packets.Tests.csproj @@ -22,7 +22,7 @@ - + diff --git a/Tests/NosSmooth.Packets.Tests/PacketStringBuilderTests.cs b/Tests/NosSmooth.Packets.Tests/PacketStringBuilderTests.cs index 848978a328b02e52f6f1f6f722203d626da10257..8e2bed20b537fbd85123b5f402c9c73d55adaab0 100644 --- a/Tests/NosSmooth.Packets.Tests/PacketStringBuilderTests.cs +++ b/Tests/NosSmooth.Packets.Tests/PacketStringBuilderTests.cs @@ -4,6 +4,7 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +using NosSmooth.PacketSerializer.Abstractions; using Xunit; namespace NosSmooth.Packets.Tests; diff --git a/Tests/NosSmooth.Packets.Tests/PacketStringEnumeratorTests.cs b/Tests/NosSmooth.Packets.Tests/PacketStringEnumeratorTests.cs index 7c8069a03978aed1e687d64b6035d6ea94a53ef3..7a058b6f8176bca3049fdaf5c57be65fa6d73f3a 100644 --- a/Tests/NosSmooth.Packets.Tests/PacketStringEnumeratorTests.cs +++ b/Tests/NosSmooth.Packets.Tests/PacketStringEnumeratorTests.cs @@ -4,9 +4,8 @@ // Copyright (c) František Boháček. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. -using System; -using System.Linq; -using NosSmooth.Packets.Errors; +using NosSmooth.PacketSerializer.Abstractions; +using NosSmooth.PacketSerializer.Abstractions.Errors; using Xunit; namespace NosSmooth.Packets.Tests;