+2009-03-29 Jonathan Pryor <jpryor@novell.com>
+
+ * Mono.Documentation/exceptions.cs: Add
+ ExceptionLocations.AddedMember, used for --exceptions=added support.
+ * Mono.Documentation/monodocer.cs: Add --exceptions=added, which will
+ only add <exception/> elements for newly added elements. This is
+ useful for updating documentation for established projects which
+ already have <exception/> corrections (e.g. *removal* of
+ <exception/> elements because the exceptions weren't actually
+ possible), so only new members should have <exception/> created.
+
2009-03-20 Jonathan Pryor <jpryor@novell.com>
* Mono.Documentation/monodocs2html.cs: Perform the timestamp check for
return loc;
foreach (var type in s.Split (',')) {
switch (type) {
+ case "added": loc |= ExceptionLocations.AddedMembers; break;
+ case "all": loc |= ExceptionLocations.Assembly | ExceptionLocations.DependentAssemblies; break;
case "asm": loc |= ExceptionLocations.Assembly; break;
case "depasm": loc |= ExceptionLocations.DependentAssemblies; break;
- case "all": loc = ExceptionLocations.All; break;
default: throw new NotSupportedException ("Unsupported --exceptions value: " + type);
}
}
if (addremarks)
WriteElementInitialText(e, "remarks", "To be added.");
- if (exceptions.HasValue && info.Member != null) {
+ if (exceptions.HasValue && info.Member != null &&
+ (exceptions.Value & ExceptionLocations.AddedMembers) == 0) {
UpdateExceptions (e, info.Member);
}
info.Node = me;
UpdateMember(info);
+ if (exceptions.HasValue &&
+ (exceptions.Value & ExceptionLocations.AddedMembers) != 0)
+ UpdateExceptions (info.Node, info.Member);
if (since != null) {
XmlNode docs = me.SelectSingleNode("Docs");