Use preferred overloads of string.Split()#23712
Conversation
|
Looks like we don't have TrimEntries yet? |
|
Hmm - I wonder why I had it in my Intellisense locally? I've not been doing full builds locally as I've been getting weird errors about missing VC stuff for the IIS module locally, which has been causing me compilation issues, so I didn't spot this error. |
@martincostello, I've also seen this on my dev box. Running |
| if (sinksFromRegistry != null) | ||
| { | ||
| foreach (string sinkFromRegistry in sinksFromRegistry.Split(';')) | ||
| foreach (string sinkFromRegistry in sinksFromRegistry.Split(';', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries)) |
There was a problem hiding this comment.
This project cross-compiles to ns2.0. I'd leave this be
| } | ||
|
|
||
| var authTypesSplit = authorizeDatum.AuthenticationSchemes?.Split(','); | ||
| var authTypesSplit = authorizeDatum.AuthenticationSchemes?.Split(',', StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries); |
There was a problem hiding this comment.
Also multi-targets ns2.0. Probably better to undo than use ifdefs
Thanks, |
Revert usage of StringSplit.TrimEntries for projects that target netstandard2.0.
pranavkm
left a comment
There was a problem hiding this comment.
Thanks @martincostello. I did not know of this API until you sent the PR.
|
@Tratcher are you happy with the hosting changes? |
|
Thanks |
Use preferred overloads of
string.Split()to leverage changes from dotnet/runtime#35740 (#23683 (comment))