Esempio n. 1
0
        internal string GetStandardClaim(string claimType)
        {
            object obj = (object)null;

            if (this.TryGetValue(claimType, out obj))
            {
                return(obj as string ?? JsonExtensions.SerializeToJson(obj));
            }
            return((string)null);
        }
Esempio n. 2
0
 /// <summary>Serializes this instance to JSON.</summary>
 /// <returns>this instance as JSON.</returns>
 /// <remarks>use <see cref="P:System.IdentityModel.Tokens.JsonExtensions.Serializer" /> to customize JSON serialization.</remarks>
 public virtual string SerializeToJson()
 {
     return(JsonExtensions.SerializeToJson((object)this));
 }