~ruther/NosSmooth

9ac147de3607a46efd83939a7790a87d7a33cf42 — František Boháček 3 years ago f0d9d68
chore: rename type generators to inline converter generators
9 files changed, 18 insertions(+), 19 deletions(-)

M Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketIndexAttributeGenerator.cs
R Core/NosSmooth.PacketSerializersGenerator/{TypeGenerators/BasicTypeGenerator.cs => InlineConverterGenerators/BasicInlineConverterGenerator.cs}
R Core/NosSmooth.PacketSerializersGenerator/{TypeGenerators/BoolTypeGenerator.cs => InlineConverterGenerators/BoolInlineConverterGenerator.cs}
R Core/NosSmooth.PacketSerializersGenerator/{TypeGenerators/EnumTypeGenerator.cs => InlineConverterGenerators/EnumInlineConverterGenerator.cs}
R Core/NosSmooth.PacketSerializersGenerator/{TypeGenerators/FallbackInlineConverterGenerator.cs => InlineConverterGenerators/FallbackInlineConverterGenerator.cs}
R Core/NosSmooth.PacketSerializersGenerator/{TypeGenerators/IInlineConverterGenerator.cs => InlineConverterGenerators/IInlineConverterGenerator.cs}
R Core/NosSmooth.PacketSerializersGenerator/{TypeGenerators/StringInlineConverterGenerator.cs => InlineConverterGenerators/StringInlineConverterGenerator.cs}
M Core/NosSmooth.PacketSerializersGenerator/InlineTypeConverterGenerator.cs
M Core/NosSmooth.PacketSerializersGenerator/SourceGenerator.cs
M Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketIndexAttributeGenerator.cs => Core/NosSmooth.PacketSerializersGenerator/AttributeGenerators/PacketIndexAttributeGenerator.cs +0 -1
@@ 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;


R Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/BasicTypeGenerator.cs => Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/BasicInlineConverterGenerator.cs +3 -3
@@ 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;

/// <summary>
/// Serializes and deserializes
/// long, ulong, int, uint, short, ushort, byte, sbyte.
/// </summary>
public class BasicTypeGenerator : IInlineConverterGenerator
public class BasicInlineConverterGenerator : IInlineConverterGenerator
{
    /// <summary>
    /// The list of the types to handle.

R Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/BoolTypeGenerator.cs => Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/BoolInlineConverterGenerator.cs +3 -3
@@ 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;

/// <inheritdoc />
public class BoolTypeGenerator : IInlineConverterGenerator
public class BoolInlineConverterGenerator : IInlineConverterGenerator
{
    /// <inheritdoc />
    public bool ShouldHandle(ParameterInfo parameter)

R Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/EnumTypeGenerator.cs => Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/EnumInlineConverterGenerator.cs +3 -3
@@ 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;

/// <inheritdoc />
public class EnumTypeGenerator : IInlineConverterGenerator
public class EnumInlineConverterGenerator : IInlineConverterGenerator
{
    /// <inheritdoc />
    public bool ShouldHandle(ParameterInfo parameter)

R Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/FallbackInlineConverterGenerator.cs => Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/FallbackInlineConverterGenerator.cs +1 -1
@@ 9,7 9,7 @@ using NosSmooth.PacketSerializersGenerator.Data;
using NosSmooth.PacketSerializersGenerator.Errors;
using NosSmooth.PacketSerializersGenerator.Extensions;

namespace NosSmooth.PacketSerializersGenerator.TypeGenerators;
namespace NosSmooth.PacketSerializersGenerator.InlineConverterGenerators;

/// <inheritdoc />
public class FallbackInlineConverterGenerator : IInlineConverterGenerator

R Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/IInlineConverterGenerator.cs => Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/IInlineConverterGenerator.cs +1 -1
@@ 8,7 8,7 @@ using System.CodeDom.Compiler;
using NosSmooth.PacketSerializersGenerator.Data;
using NosSmooth.PacketSerializersGenerator.Errors;

namespace NosSmooth.PacketSerializersGenerator.TypeGenerators;
namespace NosSmooth.PacketSerializersGenerator.InlineConverterGenerators;

/// <summary>
/// Generates inline type converters.

R Core/NosSmooth.PacketSerializersGenerator/TypeGenerators/StringInlineConverterGenerator.cs => Core/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/StringInlineConverterGenerator.cs +1 -1
@@ 9,7 9,7 @@ using NosSmooth.PacketSerializersGenerator.Data;
using NosSmooth.PacketSerializersGenerator.Errors;
using NosSmooth.PacketSerializersGenerator.Extensions;

namespace NosSmooth.PacketSerializersGenerator.TypeGenerators;
namespace NosSmooth.PacketSerializersGenerator.InlineConverterGenerators;

/// <inheritdoc />
public class StringInlineConverterGenerator : IInlineConverterGenerator

M Core/NosSmooth.PacketSerializersGenerator/InlineTypeConverterGenerator.cs => Core/NosSmooth.PacketSerializersGenerator/InlineTypeConverterGenerator.cs +1 -1
@@ 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;


M Core/NosSmooth.PacketSerializersGenerator/SourceGenerator.cs => Core/NosSmooth.PacketSerializersGenerator/SourceGenerator.cs +5 -5
@@ 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;

/// <summary>
/// Generates ITypeGenerator for packets that are marked with NosSmooth.Packets.Attributes.GenerateSerializerAttribute.
/// Generates IInlineGenerator for packets that are marked with NosSmooth.Packets.Attributes.GenerateSerializerAttribute.
/// </summary>
/// <remarks>
/// 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(),
            }
        );


Do not follow this link