-
Notifications
You must be signed in to change notification settings - Fork 286
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 for SqlConnectionPoolKey.cs #1292
Move to Shared for SqlConnectionPoolKey.cs #1292
Conversation
…nectionPoolKey and change the ifdef to NETFRAMEWORK instead of NETFX since it's not defined in the netfx csproj
…ed the references in the netfx csproj
…ocation in the netfx csproj
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnectionPoolKey.cs
Outdated
Show resolved
Hide resolved
My preference is to avoid |
I agree, please combine code together in a single if-def as much as possible, or in a separate partial class with |
…y.Common.cs and seperated it into a partial classes for clarify
Thanks! I revised my changes based on @DavoudEshtehari comments from #1261 (comment) renaming the shared src with the |
…into SqlConnectionPoolKey.Common.cs
After a discussion with @DavoudEshtehari , we decided that it might be better to combine the netfx and netcore back into one file in shared src instead of introducing the partial class with their individual netfx and netcore implementations because the file is fairly small, so it's still relatively easy to read and maintain. |
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnectionPoolKey.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnectionPoolKey.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnectionPoolKey.cs
Outdated
Show resolved
Hide resolved
…hod CalculateHashCode and Equals and move the fields and properties to the top
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.
Plz, remove the unused namespace here.
NIT: I'd suggest to follow the same pattern for all the similar changes in a file; My preference is to see the final if-else block at the end right before closing the class definition.
I did consider that but I found that having the fields, properties and constructors at the top easier to follow than to find it mixed at the end. |
Could you resolve the conflict, plz? |
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.
Please fix rebased check-in.
f92fcff
to
b633b40
Compare
Relates to #1261 . Merged the netfx version of SqlConnectionPoolKey.cs into netcore, and move it to the share src. I did notice that the netfx uses the
ICloneable
interface and the netcore version overrides theClone
method, and I went with the netcore version and verified it still compiled successfully on netfx.