private static void ShowClaimSetHtml(ClaimSet set, bool isIssuer, bool verbose) { if (set.HasIssuer()) { ShowClaimSetHtml(set.Issuer, true, verbose); } string setType = set.GetType().Name; string setName = isIssuer ? "Issuer" : "Issued"; HeadingHtml(String.Format("\n{0} Claims ({1})\n", setName, setType)); foreach (Claim claim in set) { bool isIdentity = claim.Right.Equals(Rights.Identity); WriteLineHtml(claim.ClaimType, isIdentity); if (verbose) { WriteLineHtml(claim.Resource.GetType().FullName, isIdentity); WriteLineHtml(claim.Stringify(), isIdentity); } else { WriteLineHtml(claim.Resource.ToString(), isIdentity); } WriteLineHtml(claim.Right, isIdentity); WriteLineHtml("", false); Console.ResetColor(); } }
private static void ShowClaimSet(ClaimSet set, bool isIssuer, bool verbose) { if (set.HasIssuer()) { ShowClaimSet(set.Issuer, true, verbose); } string setType = set.GetType().Name; string setName = isIssuer ? "Issuer" : "Issued"; Heading(String.Format("\n{0} Claims ({1})\n", setName, setType), ConsoleColor.Green); if (set.Count == 0) { Console.WriteLine("(anonymous)\n"); } foreach (Claim claim in set) { if (claim.Right.Equals(Rights.Identity)) { Console.ForegroundColor = ConsoleColor.White; } Console.WriteLine(claim.ClaimType); if (verbose) { Console.WriteLine(claim.Resource.GetType().FullName); Console.WriteLine(claim.Stringify()); } else { Console.WriteLine(claim.Resource); } Console.WriteLine(claim.Right); Console.WriteLine(); Console.ResetColor(); } }
private static void ShowClaimSet(ClaimSet set, bool isIssuer, bool verbose) { if (set.HasIssuer()) { ShowClaimSet(set.Issuer, true, verbose); } string setType = set.GetType().Name; string setName = isIssuer ? "Issuer" : "Issued"; Heading(String.Format("\n{0} Claims ({1})\n", setName, setType), ConsoleColor.Green); if (set.Count == 0) { Console.WriteLine("(anonymous)\n"); } foreach (Claim claim in set) { if (claim.Right.Equals(Rights.Identity)) { Console.ForegroundColor = ConsoleColor.White; } Console.WriteLine(claim.ClaimType); if (verbose) { Console.WriteLine(claim.Resource.GetType().FullName); Console.WriteLine(claim.Stringify()); } else { Console.WriteLine(claim.Resource); } Console.WriteLine(claim.Right); Console.WriteLine(); Console.ResetColor(); } }
private static void ShowClaimSetHtml(ClaimSet set, bool isIssuer, bool verbose) { if (set.HasIssuer()) { ShowClaimSetHtml(set.Issuer, true, verbose); } string setType = set.GetType().Name; string setName = isIssuer ? "Issuer" : "Issued"; HeadingHtml(String.Format("\n{0} Claims ({1})\n", setName, setType)); foreach (Claim claim in set) { bool isIdentity = claim.Right.Equals(Rights.Identity); WriteLineHtml(claim.ClaimType, isIdentity); if (verbose) { WriteLineHtml(claim.Resource.GetType().FullName, isIdentity); WriteLineHtml(claim.Stringify(), isIdentity); } else { WriteLineHtml(claim.Resource.ToString(), isIdentity); } WriteLineHtml(claim.Right, isIdentity); WriteLineHtml("", false); Console.ResetColor(); } }