internal static CommunicationIdentityAccessTokenResult DeserializeCommunicationIdentityAccessTokenResult(JsonElement element) { CommunicationIdentity identity = default; Optional <CommunicationUserToken> accessToken = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("identity")) { identity = CommunicationIdentity.DeserializeCommunicationIdentity(property.Value); continue; } if (property.NameEquals("accessToken")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } accessToken = CommunicationUserToken.DeserializeCommunicationUserToken(property.Value); continue; } } return(new CommunicationIdentityAccessTokenResult(identity, accessToken.Value)); }
internal CommunicationIdentityAccessTokenResult(CommunicationIdentity identity) { if (identity == null) { throw new ArgumentNullException(nameof(identity)); } Identity = identity; }
internal CommunicationIdentityAccessTokenResult(CommunicationIdentity identity, CommunicationIdentityAccessToken accessToken) { Identity = identity; AccessToken = accessToken; }