Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why IsNullOrEmpty check of an enumerable part of Microsoft.IdentityModel.Tokens?

I found a code today where an enumerable is being checked for null or empty using static IsNullOrEmpty method exposed through Microsoft.IdentityModel.Tokens.

Now in Microsoft documentation it is listed under confidential client. My question is around the usage of it. Can this be used for any enumerable in any use case or is it recommended to use it in certain use cases? I don't find it normal to use such a functionality exposed by Microsoft.IdentityModel.Tokens. What could have been the intention? https://learn.microsoft.com/en-us/dotnet/api/microsoft.identitymodel.tokens.collectionutilities.isnullorempty?view=msal-web-dotnet-latest

like image 202
soumyadeb ghoshal Avatar asked Dec 16 '25 23:12

soumyadeb ghoshal


1 Answers

The extension Microsoft.IdentityModel.Tokens.CollectionUtilities.IsNullOrEmpty was incorrectly exposed as a public method and will be changed to internal in a later release of IdentityModel.

Conflict with Microsoft.IdentityModel.Tokens.CollectionUtilities.IsNullOrEmpty extension - Github.com

Make CollectionUtilities Internal - Github.com

like image 83
haroonie Avatar answered Dec 19 '25 11:12

haroonie



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!