avoid tostring in SqlConnectionEncryptOptionConverter if we know value is a string#4012
Conversation
There was a problem hiding this comment.
Pull request overview
This PR makes a minor performance improvement in SqlConnectionEncryptOptionConverter.ConvertFrom by using C# pattern matching (value is string s) to avoid an unnecessary ToString() call on an object already known to be a string.
Changes:
- Replace
value is stringtype check +value.ToString()withvalue is string spattern match to directly use the captured string variable.
|
/azp run |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #4012 +/- ##
==========================================
- Coverage 72.36% 66.34% -6.02%
==========================================
Files 287 274 -13
Lines 43149 65785 +22636
==========================================
+ Hits 31223 43646 +12423
- Misses 11926 22139 +10213
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.