Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/mcs/doc.cs')
-rw-r--r--mcs/mcs/doc.cs37
1 files changed, 36 insertions, 1 deletions
diff --git a/mcs/mcs/doc.cs b/mcs/mcs/doc.cs
index 1c12168aef0..3aa4590ead2 100644
--- a/mcs/mcs/doc.cs
+++ b/mcs/mcs/doc.cs
@@ -62,6 +62,15 @@ namespace Mono.CSharp {
foreach (TypeContainer tc in t.Types)
tc.GenerateDocComment (t);
+ if (t.Parts != null) {
+ IDictionary comments = RootContext.Documentation.PartialComments;
+ foreach (ClassPart cp in t.Parts) {
+ if (cp.DocComment == null)
+ continue;
+ comments [cp] = cp;
+ }
+ }
+
if (t.Enums != null)
foreach (Enum en in t.Enums)
en.GenerateDocComment (t);
@@ -178,7 +187,7 @@ namespace Mono.CSharp {
n.WriteTo (RootContext.Documentation.XmlCommentOutput);
}
- else if (mc.IsExposedFromAssembly ()) {
+ else if (mc.IsExposedFromAssembly (ds)) {
Constructor c = mc as Constructor;
if (c == null || !c.IsDefault ())
Report.Warning (1591, 4, mc.Location,
@@ -987,6 +996,13 @@ namespace Mono.CSharp {
public Hashtable StoredDocuments = new Hashtable ();
//
+ // Stores comments on partial types (should handle uniquely).
+ // Keys are PartialContainers, values are comment strings
+ // (didn't use StringBuilder; usually we have just 2 or more).
+ //
+ public IDictionary PartialComments = new ListDictionary ();
+
+ //
// Outputs XML documentation comment from tokenized comments.
//
public bool OutputDocComment (string asmfilename)
@@ -1034,6 +1050,15 @@ namespace Mono.CSharp {
foreach (TypeContainer tc in root.Types)
DocUtil.GenerateTypeDocComment (tc, null);
+ if (root.Parts != null) {
+ IDictionary comments = PartialComments;
+ foreach (ClassPart cp in root.Parts) {
+ if (cp.DocComment == null)
+ continue;
+ comments [cp] = cp;
+ }
+ }
+
if (root.Delegates != null)
foreach (Delegate d in root.Delegates)
DocUtil.GenerateDocComment (d, null);
@@ -1042,6 +1067,16 @@ namespace Mono.CSharp {
foreach (Enum e in root.Enums)
e.GenerateDocComment (null);
+ IDictionary table = new ListDictionary ();
+ foreach (ClassPart cp in PartialComments.Keys) {
+ // FIXME: IDictionary does not guarantee that the keys will be
+ // accessed in the order they were added.
+ table [cp.PartialContainer] += cp.DocComment;
+ }
+ foreach (PartialContainer pc in table.Keys) {
+ pc.DocComment = table [pc] as string;
+ DocUtil.GenerateDocComment (pc, null);
+ }
}
}
}