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

1

7

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

Hoosegow answered 4/8, 2023 at 21:44 Comment(0)
F
7

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

Fuld answered 2/1 at 17:29 Comment(1)
GitHub issue tracking the bug fix which will hopefully be in version 8 of the Microsoft.IdentityModel.Tokens package: github.com/AzureAD/…Cassaundracassava

© 2022 - 2024 — McMap. All rights reserved.