From 9ac147de3607a46efd83939a7790a87d7a33cf42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Boh=C3=A1=C4=8Dek?= Date: Sat, 1 Jan 2022 14:55:38 +0100 Subject: [PATCH] chore: rename type generators to inline converter generators --- .../PacketIndexAttributeGenerator.cs | 1 - .../BasicInlineConverterGenerator.cs} | 6 +++--- .../BoolInlineConverterGenerator.cs} | 6 +++--- .../EnumInlineConverterGenerator.cs} | 6 +++--- .../FallbackInlineConverterGenerator.cs | 2 +- .../IInlineConverterGenerator.cs | 2 +- .../StringInlineConverterGenerator.cs | 2 +- .../InlineTypeConverterGenerator.cs | 2 +- .../SourceGenerator.cs | 10 +++++----- 9 files changed, 18 insertions(+), 19 deletions(-) rename Core/NosSmooth.PacketSerializersGenerator/{TypeGenerators/BasicTypeGenerator.cs => InlineConverterGenerators/BasicInlineConverterGenerator.cs} (93%) rename Core/NosSmooth.PacketSerializersGenerator/{TypeGenerators/BoolTypeGenerator.cs => InlineConverterGenerators/BoolInlineConverterGenerator.cs} (92%) rename Core/NosSmooth.PacketSerializersGenerator/{TypeGenerators/EnumTypeGenerator.cs => InlineConverterGenerators/EnumInlineConverterGenerator.cs} (93%) rename Core/NosSmooth.PacketSerializersGenerator/{TypeGenerators => InlineConverterGenerators}/FallbackInlineConverterGenerator.cs (96%) rename Core/NosSmooth.PacketSerializersGenerator/{TypeGenerators => InlineConverterGenerators}/IInlineConverterGenerator.cs (94%) rename Core/NosSmooth.PacketSerializersGenerator/{TypeGenerators => InlineConverterGenerators}/StringInlineConverterGenerator.cs (95%) diff --git a/Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketIndexAttributeGenerator.cs b/Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketIndexAttributeGenerator.cs index 8fa5902..004eb3f 100644 --- a/Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketIndexAttributeGenerator.cs +++ b/Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketIndexAttributeGenerator.cs @@ -8,7 +8,6 @@ using System.CodeDom.Compiler; using NosSmooth.PacketSerializersGenerator.Data; using NosSmooth.PacketSerializersGenerator.Errors; using NosSmooth.PacketSerializersGenerator.Extensions; -using NosSmooth.PacketSerializersGenerator.TypeGenerators; namespace NosSmooth.PacketSerializersGenerator.AttributeGenerators; diff --git a/Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/BasicTypeGenerator.cs b/Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/BasicInlineConverterGenerator.cs similarity index 93% rename from Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/BasicTypeGenerator.cs rename to Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/BasicInlineConverterGenerator.cs index 7d6936d..50afa90 100644 --- a/Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/BasicTypeGenerator.cs +++ b/Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/BasicInlineConverterGenerator.cs @@ -1,5 +1,5 @@ // -// BasicTypeGenerator.cs +// BasicInlineConverterGenerator.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. @@ -9,13 +9,13 @@ using NosSmooth.PacketSerializersGenerator.Data; using NosSmooth.PacketSerializersGenerator.Errors; using NosSmooth.PacketSerializersGenerator.Extensions; -namespace NosSmooth.PacketSerializersGenerator.TypeGenerators; +namespace NosSmooth.PacketSerializersGenerator.InlineConverterGenerators; /// /// Serializes and deserializes /// long, ulong, int, uint, short, ushort, byte, sbyte. /// -public class BasicTypeGenerator : IInlineConverterGenerator +public class BasicInlineConverterGenerator : IInlineConverterGenerator { /// /// The list of the types to handle. diff --git a/Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/BoolTypeGenerator.cs b/Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/BoolInlineConverterGenerator.cs similarity index 92% rename from Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/BoolTypeGenerator.cs rename to Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/BoolInlineConverterGenerator.cs index 84e6737..2dfbe17 100644 --- a/Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/BoolTypeGenerator.cs +++ b/Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/BoolInlineConverterGenerator.cs @@ -1,5 +1,5 @@ // -// BoolTypeGenerator.cs +// BoolInlineConverterGenerator.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. @@ -9,10 +9,10 @@ using NosSmooth.PacketSerializersGenerator.Data; using NosSmooth.PacketSerializersGenerator.Errors; using NosSmooth.PacketSerializersGenerator.Extensions; -namespace NosSmooth.PacketSerializersGenerator.TypeGenerators; +namespace NosSmooth.PacketSerializersGenerator.InlineConverterGenerators; /// -public class BoolTypeGenerator : IInlineConverterGenerator +public class BoolInlineConverterGenerator : IInlineConverterGenerator { /// public bool ShouldHandle(ParameterInfo parameter) diff --git a/Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/EnumTypeGenerator.cs b/Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/EnumInlineConverterGenerator.cs similarity index 93% rename from Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/EnumTypeGenerator.cs rename to Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/EnumInlineConverterGenerator.cs index 44019d1..b59f2c4 100644 --- a/Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/EnumTypeGenerator.cs +++ b/Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/EnumInlineConverterGenerator.cs @@ -1,5 +1,5 @@ // -// EnumTypeGenerator.cs +// EnumInlineConverterGenerator.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. @@ -10,10 +10,10 @@ using NosSmooth.PacketSerializersGenerator.Data; using NosSmooth.PacketSerializersGenerator.Errors; using NosSmooth.PacketSerializersGenerator.Extensions; -namespace NosSmooth.PacketSerializersGenerator.TypeGenerators; +namespace NosSmooth.PacketSerializersGenerator.InlineConverterGenerators; /// -public class EnumTypeGenerator : IInlineConverterGenerator +public class EnumInlineConverterGenerator : IInlineConverterGenerator { /// public bool ShouldHandle(ParameterInfo parameter) diff --git a/Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/FallbackInlineConverterGenerator.cs b/Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/FallbackInlineConverterGenerator.cs similarity index 96% rename from Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/FallbackInlineConverterGenerator.cs rename to Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/FallbackInlineConverterGenerator.cs index 89ba8f1..e9dd07f 100644 --- a/Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/FallbackInlineConverterGenerator.cs +++ b/Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/FallbackInlineConverterGenerator.cs @@ -9,7 +9,7 @@ using NosSmooth.PacketSerializersGenerator.Data; using NosSmooth.PacketSerializersGenerator.Errors; using NosSmooth.PacketSerializersGenerator.Extensions; -namespace NosSmooth.PacketSerializersGenerator.TypeGenerators; +namespace NosSmooth.PacketSerializersGenerator.InlineConverterGenerators; /// public class FallbackInlineConverterGenerator : IInlineConverterGenerator diff --git a/Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/IInlineConverterGenerator.cs b/Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/IInlineConverterGenerator.cs similarity index 94% rename from Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/IInlineConverterGenerator.cs rename to Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/IInlineConverterGenerator.cs index 1556b02..6bc91bf 100644 --- a/Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/IInlineConverterGenerator.cs +++ b/Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/IInlineConverterGenerator.cs @@ -8,7 +8,7 @@ using System.CodeDom.Compiler; using NosSmooth.PacketSerializersGenerator.Data; using NosSmooth.PacketSerializersGenerator.Errors; -namespace NosSmooth.PacketSerializersGenerator.TypeGenerators; +namespace NosSmooth.PacketSerializersGenerator.InlineConverterGenerators; /// /// Generates inline type converters. diff --git a/Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/StringInlineConverterGenerator.cs b/Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/StringInlineConverterGenerator.cs similarity index 95% rename from Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/StringInlineConverterGenerator.cs rename to Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/StringInlineConverterGenerator.cs index 8bf9cdd..14e960d 100644 --- a/Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/StringInlineConverterGenerator.cs +++ b/Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/StringInlineConverterGenerator.cs @@ -9,7 +9,7 @@ using NosSmooth.PacketSerializersGenerator.Data; using NosSmooth.PacketSerializersGenerator.Errors; using NosSmooth.PacketSerializersGenerator.Extensions; -namespace NosSmooth.PacketSerializersGenerator.TypeGenerators; +namespace NosSmooth.PacketSerializersGenerator.InlineConverterGenerators; /// public class StringInlineConverterGenerator : IInlineConverterGenerator diff --git a/Core/NosSmooth.PacketSerializersGenerator/InlineTypeConverterGenerator.cs b/Core/NosSmooth.PacketSerializersGenerator/InlineTypeConverterGenerator.cs index c4e6d9a..a00e008 100644 --- a/Core/NosSmooth.PacketSerializersGenerator/InlineTypeConverterGenerator.cs +++ b/Core/NosSmooth.PacketSerializersGenerator/InlineTypeConverterGenerator.cs @@ -8,7 +8,7 @@ using System.CodeDom.Compiler; using NosSmooth.PacketSerializersGenerator.Data; using NosSmooth.PacketSerializersGenerator.Errors; using NosSmooth.PacketSerializersGenerator.Extensions; -using NosSmooth.PacketSerializersGenerator.TypeGenerators; +using NosSmooth.PacketSerializersGenerator.InlineConverterGenerators; namespace NosSmooth.PacketSerializersGenerator; diff --git a/Core/NosSmooth.PacketSerializersGenerator/SourceGenerator.cs b/Core/NosSmooth.PacketSerializersGenerator/SourceGenerator.cs index 7669fef..23ee403 100644 --- a/Core/NosSmooth.PacketSerializersGenerator/SourceGenerator.cs +++ b/Core/NosSmooth.PacketSerializersGenerator/SourceGenerator.cs @@ -14,12 +14,12 @@ using NosSmooth.PacketSerializersGenerator.AttributeGenerators; using NosSmooth.PacketSerializersGenerator.Data; using NosSmooth.PacketSerializersGenerator.Errors; using NosSmooth.PacketSerializersGenerator.Extensions; -using NosSmooth.PacketSerializersGenerator.TypeGenerators; +using NosSmooth.PacketSerializersGenerator.InlineConverterGenerators; namespace NosSmooth.PacketSerializersGenerator; /// -/// Generates ITypeGenerator for packets that are marked with NosSmooth.Packets.Attributes.GenerateSerializerAttribute. +/// Generates IInlineGenerator for packets that are marked with NosSmooth.Packets.Attributes.GenerateSerializerAttribute. /// /// /// The packets to create serializer for have to be records that specify PacketIndices in the constructor. @@ -37,9 +37,9 @@ public class SourceGenerator : ISourceGenerator new IInlineConverterGenerator[] { new StringInlineConverterGenerator(), - new BasicTypeGenerator(), - new EnumTypeGenerator(), - new BoolTypeGenerator(), + new BasicInlineConverterGenerator(), + new EnumInlineConverterGenerator(), + new BoolInlineConverterGenerator(), } ); -- 2.48.1