Files
KinginfoGateway/src/Admin/ThingsGateway.Admin.Application/OAuth/OAuthUserExtensions.cs
2025-06-15 00:17:25 +08:00

12 lines
411 B
C#

using System.Text.Json;
namespace ThingsGateway.Admin.Application;
public static class OAuthUserExtensions
{
public static string TryGetValue(this JsonElement.ObjectEnumerator target, string propertyName)
{
return target.FirstOrDefault<JsonProperty>((Func<JsonProperty, bool>)(t => t.Name.Equals(propertyName, StringComparison.OrdinalIgnoreCase))).Value.ToString() ?? string.Empty;
}
}