-
Notifications
You must be signed in to change notification settings - Fork 285
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
Move to Shared - SqlSer.cs #1313
Move to Shared - SqlSer.cs #1313
Conversation
This is part of Code merge for issue dotnet#1261. I have created .common.cs and moved the uncommon code to private methods.
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/Server/SqlSer.cs
Outdated
Show resolved
Hide resolved
There's not that much code remaining in the framework specific files. Why don't we just move it to the common file? |
Removed Netfx and Netcore files for SqlSer and added Netfx if endifs in common file
Just updating class not use partial anymore, indentation, comment correction
@johnnypham I just removed the netfx and netcore classes and updated SqlSer.cs in common project with the three functions.
|
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.
The SerializationHelperSql9
could be sealed: internal sealed class SerializationHelperSql9
Also, I see some minor possible improvements like unnecessary assignment
and redundant member
. You can find them in the error list
window.
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'd suggest using Dictionary
instead of Hashtable
to avoid boxing and unboxing for s_types2Serializers:
private static ConcurrentDictionary<Type, Serializer> s_types2Serializers;
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlSer.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlSer.cs
Outdated
Show resolved
Hide resolved
addressing review comments
04593ff
to
e6b777c
Compare
VSCode suggestions
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlSer.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/Server/SqlSer.cs
Outdated
Show resolved
Hide resolved
Added check for key in dictionary and addressed review comments
This is part of Code merge for issue #1261. I have created .common.cs and moved the uncommon code to private methods.