diff options
author | Sebastien Pouliot <sebastien@ximian.com> | 2008-08-11 16:36:45 +0400 |
---|---|---|
committer | Sebastien Pouliot <sebastien@ximian.com> | 2008-08-11 16:36:45 +0400 |
commit | 565e65cfb60167473c620bf2b311e885c668f509 (patch) | |
tree | 3a36e2a8570b7f04e2084e88d5b159a7dbfad495 /gui-compare | |
parent | c89808b465be9ab750c4952219f3ffc320acdaa2 (diff) |
2008-08-11 Sebastien Pouliot <sebastien@ximian.com>
* CecilMetadata.cs: PrettyPrint nullable types correctly.
svn path=/trunk/mono-tools/; revision=110100
Diffstat (limited to 'gui-compare')
-rw-r--r-- | gui-compare/CecilMetadata.cs | 7 | ||||
-rw-r--r-- | gui-compare/ChangeLog | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gui-compare/CecilMetadata.cs b/gui-compare/CecilMetadata.cs index af782689..0de84aa1 100644 --- a/gui-compare/CecilMetadata.cs +++ b/gui-compare/CecilMetadata.cs @@ -13,7 +13,12 @@ namespace GuiCompare { static class CecilUtils { public static string PrettyType (string type) { - /* handle suffixes first, recursively */ + /* handle prefixes first, like nullable types, recursively */ + if (type.StartsWith ("System.Nullable`1<")) { + return String.Concat (PrettyType (type.Substring (18, type.Length - 19)), "?"); + } + + /* then handle suffixes, recursively */ if (type.EndsWith ("[]")) return String.Concat (PrettyType (type.Substring (0, type.Length - 2)), "[]"); else if (type.EndsWith ("*")) diff --git a/gui-compare/ChangeLog b/gui-compare/ChangeLog index d4b761fa..ed750462 100644 --- a/gui-compare/ChangeLog +++ b/gui-compare/ChangeLog @@ -1,3 +1,7 @@ +2008-08-11 Sebastien Pouliot <sebastien@ximian.com> + + * CecilMetadata.cs: PrettyPrint nullable types correctly. + 2008-08-08 Sebastien Pouliot <sebastien@ximian.com> * CecilMetadata.cs: Don't recurse on BaseType when looking at |