diff options
author | Sebastien Pouliot <sebastien@ximian.com> | 2005-05-16 23:44:29 +0400 |
---|---|---|
committer | Sebastien Pouliot <sebastien@ximian.com> | 2005-05-16 23:44:29 +0400 |
commit | bc6f1e1ba3b806c5a41f0e4953d888b19b1302ff (patch) | |
tree | 91986937c7f9ac1de67b5c39345108eec205b70b /mcs/class/corlib/System.Security/SecurityFrame.cs | |
parent | b62761f30431e4bb01fb980d8afabf547908eec7 (diff) |
2005-05-16 Sebastien Pouliot <sebastien@ximian.com>
* PermissionSet.cs: Add support for "hidden" read-only mode (as used
by PolicyStatement).
* SecurityFrame.cs: Add some debugging code in the ToString method.
* SecurityManager.cs: Changed internal API so we can display the
permission that failed in a PermissionSet (e.g. assembly or appdomain).
svn path=/trunk/mcs/; revision=44585
Diffstat (limited to 'mcs/class/corlib/System.Security/SecurityFrame.cs')
-rw-r--r-- | mcs/class/corlib/System.Security/SecurityFrame.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mcs/class/corlib/System.Security/SecurityFrame.cs b/mcs/class/corlib/System.Security/SecurityFrame.cs index 14f412dfb6f..7824e0880dd 100644 --- a/mcs/class/corlib/System.Security/SecurityFrame.cs +++ b/mcs/class/corlib/System.Security/SecurityFrame.cs @@ -31,6 +31,7 @@ using System.Globalization; using System.Reflection; using System.Runtime.CompilerServices; using System.Security.Permissions; +using System.Text; namespace System.Security { @@ -152,6 +153,21 @@ namespace System.Security { return true; } + public override string ToString () + { + StringBuilder sb = new StringBuilder (); + sb.AppendFormat ("Frame: {0}{1}", _method, Environment.NewLine); + sb.AppendFormat ("\tAppDomain: {0}{1}", Domain, Environment.NewLine); + sb.AppendFormat ("\tAssembly: {0}{1}", Assembly, Environment.NewLine); + if (_assert != null) + sb.AppendFormat ("\tAssert: {0}{1}", _assert, Environment.NewLine); + if (_deny != null) + sb.AppendFormat ("\tDeny: {0}{1}", _deny, Environment.NewLine); + if (_permitonly != null) + sb.AppendFormat ("\tPermitOnly: {0}{1}", _permitonly, Environment.NewLine); + return sb.ToString (); + } + static public ArrayList GetStack (int skipFrames) { Array stack = _GetSecurityStack (skipFrames+2); |