Skip to content

Use C# pattern matching for matching types. #25

@imback82

Description

@imback82

There are many places where we are doing the following:
PayloadHelper.GetTypeId():

        if (type == typeof(int))
        {
            return new[] { Convert.ToByte('i') };
        }
        if (type == typeof(long))
        {
            return new[] { Convert.ToByte('g') };
        }
        ..

Use C#'s pattern matching instead if applicable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions