diff options
author | Marek Habersack <grendel@twistedcode.net> | 2010-02-12 04:53:57 +0300 |
---|---|---|
committer | Marek Habersack <grendel@twistedcode.net> | 2010-02-12 04:53:57 +0300 |
commit | 89740894c6fd49bc19786fefbc515d0a45ddc3fc (patch) | |
tree | 21527794cfa724b60cdcc759ac613d3dacb249cb /gui-compare | |
parent | fec751c396fcb431b9ea0cff737383ed0c1a6748 (diff) |
Fixed rendering of attributes in extra info
svn path=/trunk/mono-tools/; revision=151582
Diffstat (limited to 'gui-compare')
-rw-r--r-- | gui-compare/CecilMetadata.cs | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/gui-compare/CecilMetadata.cs b/gui-compare/CecilMetadata.cs index 5ece7c52..65e6c040 100644 --- a/gui-compare/CecilMetadata.cs +++ b/gui-compare/CecilMetadata.cs @@ -1134,10 +1134,10 @@ namespace GuiCompare { : base (ca.Constructor.DeclaringType.FullName) { var sb = new StringBuilder ("[" + ca.Constructor.DeclaringType.FullName); - + bool first = true; + IList cparams = ca.ConstructorParameters; if (cparams != null && cparams.Count > 0) { - bool first = true; foreach (object o in cparams) { if (first) { sb.Append (" ("); @@ -1147,9 +1147,26 @@ namespace GuiCompare { sb.Append (FormatValue (o)); } - sb.Append (")]"); + } + IDictionary properties = ca.Properties; + if (properties != null && properties.Count > 0) { + foreach (DictionaryEntry de in properties) { + if (first) { + sb.Append (" ("); + first = false; + } else + sb.Append (", "); + + sb.AppendFormat ("{0}={1}", de.Key, FormatValue (de.Value)); + } + } + + if (!first) + sb.Append (')'); + sb.Append ("]"); + ExtraInfo = sb.ToString (); } @@ -1161,6 +1178,9 @@ namespace GuiCompare { if (o is string) return "\"" + o + "\""; + if (o is bool) + return o.ToString ().ToLowerInvariant (); + return o.ToString (); } } |