public bool TryGetValue(JsonEncodedText key, out JwtMember value) { if (key.Equals(_value1.Name)) { value = _value1; } else if (key.Equals(_value2.Name)) { value = _value2; } else if (key.Equals(_value3.Name)) { value = _value3; } else if (key.Equals(_value4.Name)) { value = _value4; } else { #if NET5_0_OR_GREATER Unsafe.SkipInit(out value); #else value = default; #endif return(false); } return(true); }
public bool TryGetValue(JsonEncodedText key, out JwtMember value) { if (key.Equals(_value1.Name)) { value = _value1; } else if (key.Equals(_value2.Name)) { value = _value2; } else if (key.Equals(_value3.Name)) { value = _value3; } else if (key.Equals(_value4.Name)) { value = _value4; } else { value = default; return(false); } return(true); }
public bool ContainsKey(JsonEncodedText key) { for (int i = 0; i < _count; i++) { JwtMember pair = _keyValues[i]; if (key.Equals(pair.Name)) { return(true); } } return(false); }
public bool TryGetValue(JsonEncodedText key, out JwtMember value) { for (int i = 0; i < _count; i++) { JwtMember pair = _keyValues[i]; if (key.Equals(pair.Name)) { value = pair; return(true); } } value = default; return(false); }
/// <summary>Gets or sets the first <see cref="Jwk"/> with its 'kid'.</summary> public Jwk?this[JsonEncodedText kid] { get { var keys = _keys; for (int i = 0; i < keys.Count; i++) { var key = keys[i]; if (kid.Equals(key.Kid)) { return(key); } } return(null); } }
public bool TryGetValue(JsonEncodedText key, out JwtMember value) { for (int i = 0; i < _count; i++) { JwtMember pair = _keyValues[i]; if (key.Equals(pair.Name)) { value = pair; return(true); } } #if NET5_0_OR_GREATER Unsafe.SkipInit(out value); #else value = default; #endif return(false); }
public bool ContainsKey(JsonEncodedText key) => key.Equals(_value1.Name) || key.Equals(_value2.Name) || key.Equals(_value3.Name) || key.Equals(_value4.Name);