~ruther/NosSmooth

493935a2f77a55defb0c4416a92a57acdfd97842 — František Boháček 2 years ago c8bcfd6
fix(packets): correctly deserialize list with nullable elements inline
M Packets/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/BasicInlineConverterGenerator.cs => Packets/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/BasicInlineConverterGenerator.cs +1 -1
@@ 51,7 51,7 @@ public class BasicInlineConverterGenerator : IInlineConverterGenerator
    {
        var type = typeSyntax is not null
            ? typeSyntax.ToString().TrimEnd('?')
            : typeSymbol?.ToString();
            : typeSymbol?.ToString().TrimEnd('?');
        if (type is null)
        {
            throw new Exception("TypeSyntax or TypeSymbol has to be non null.");

M Packets/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/ListInlineConverterGenerator.cs => Packets/NosSmooth.PacketSerializersGenerator/InlineConverterGenerators/ListInlineConverterGenerator.cs +1 -1
@@ 96,7 96,7 @@ public class ListInlineConverterGenerator : IInlineConverterGenerator
    private string GetMethodName(ITypeSymbol genericArgumentType)
    {
        return
            $"ParseList{genericArgumentType.ToString().Replace('.', '_')}{((genericArgumentType.IsNullable() ?? false) ? "Nullable" : string.Empty)}";
            $"ParseList{genericArgumentType.ToString().TrimEnd('?').Replace('.', '_')}{((genericArgumentType.IsNullable() ?? false) ? "Nullable" : string.Empty)}";
    }

    /// <inheritdoc />

Do not follow this link