Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use C# pattern matching for matching types. #25

Open
imback82 opened this issue Jan 15, 2019 · 0 comments · May be fixed by #1003
Open

Use C# pattern matching for matching types. #25

imback82 opened this issue Jan 15, 2019 · 0 comments · May be fixed by #1003
Labels
good first issue Good for newcomers

Comments

@imback82
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants