[mono-api-html] Make the [Obsolete] a bit prettier when no text message is available
authorSebastien Pouliot <sebastien@xamarin.com>
Tue, 6 May 2014 01:50:34 +0000 (21:50 -0400)
committerSebastien Pouliot <sebastien@xamarin.com>
Tue, 6 May 2014 12:54:56 +0000 (08:54 -0400)
mcs/tools/corcompare/mono-api-html/MemberComparer.cs

index c76aa9a6154bd9a9c7480ff94fff057a07fe320c..5784c17f89ed36767c4831d489da76f5f206c47e 100644 (file)
@@ -147,7 +147,10 @@ namespace Xamarin.ApiDiff {
                        var sb = new StringBuilder ();
                        string o = e.GetObsoleteMessage ();
                        if (o != null) {
-                               sb.Append ("[Obsolete (\"").Append (o).AppendLine ("\")]");
+                               sb.Append ("[Obsolete");
+                               if (o.Length > 0)
+                                       sb.Append (" \"").Append (o).Append ("\")");
+                               sb.AppendLine ("]");
                                for (int i = 0; i < State.Indent + 1; i++)
                                        sb.Append ('\t');
                        }