-
Notifications
You must be signed in to change notification settings - Fork 315
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 pattern matching in PayloadHelper.cs to improve readability #1003
base: main
Are you sure you want to change the base?
Conversation
Improves the readability using c# pattern matching fixes dotnet#25
this was the last occurrence of this issue i found |
if (type == typeof(byte[])) | ||
{ | ||
return s_byteArrayTypeId; | ||
} | ||
|
||
if (type == typeof(int[]) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be included in the switch expression ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ | ||
return s_timestampTypeId; | ||
} | ||
_ when typeof(IJvmObjectReferenceProvider).IsAssignableFrom(type) => s_jvmObjectTypeId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think some of these lines are too long. Can you check https://github.com/dotnet/spark/blob/main/docs/coding-guidelines/csharp-coding-style.md ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like builds are failing. Can you look into it ? |
i fixed one reason and the other one was there before |
Hi @sneznaj, are you still working on this? |
Improves the readability using c# pattern matching
fixes #25