In some limited circumstances, renames will be tracked, minimizing the documentation burden when e.g. a parameter is renamed.
mdoc update does not rely on documentation found within source code, though it can import XML Documentation Comments via the -i option.
See mdoc(1) and mdoc(5) for more information.
If a type is no longer present, the documentation file is not deleted, but is instead renamed to have a .remove extension.
Version detection is done with the //AssemblyVersion elements; if there are no //AssemblyVersion elements for a given <Type> or <Member/>, then the <Type> will be renamed and/or the <Member/> will be removed.
Inspect member bodies to determine what exceptions can be generated from the member.
SOURCES is an optional comma-separated list of the following sources that should be searched for exceptions:
added Only generate <exception/> elements for members added during the current program execution. This keeps mdoc-update from re-generating <exception/> elements for all members (and thus prevents re-insertion for members that had the <exception/> elements removed). all Find exceptions created in the member itself, references to members in the same assembly, and references to members in dependent assemblies. asm Find exceptions created in the member itself and references to members within the same assembly as the member. depasm Find exceptions created in the member itself and references to members within dependent assemblies.
If SOURCES isn't provided (the default), then only exceptions created within the member itself will be documented.
LIMITATIONS: Exception searching is currently implemented by looking for the exception types that are explicitly created based on the known compile-time types. This has the following limitations:
public void CreateAnException () { Exception e = new Exception (); }
public void UsesDelegates () { Func<int, int> a = x => {throw new Exception ();}; a (4); }The function UsesDelegates() won't have any exceptions documented.
public void A () { B ("this parameter isn't null"); } public void B (string s) { if (s == null) throw new ArgumentNullException ("s"); }For the above, if --exceptions=asm is provided then A() will be documented as throwing an ArgumentNullException, which cannot happen.
This is useful to prevent "churn" during updates. Normally, if a type or member hasn't changed but the assembly version has changed, then all types and members will be updated to include a new //AssemblyVersion element, thus increasing the amount of changes that need review before committing (assuming all changes are actually reviewed before commit).
WARNING: This will interact badly with the --delete option, as --delete uses the //AssemblyVersion elements to track version changes. Thus, if you have a member which is present in an early assembly version and is removed in a subsequent assembly version, such as System.Text.UTF8Encoding.GetBytes(string) (which is present in .NET 1.0 but not in .NET 2.0), then the member will be removed when the --delete -fno-assembly-versions options are specified, the member was present in an earlier version of the assembly, and the current version of the assembly does not contain the member.
Consequently, this option should only be specified if types and members will never be removed from an assembly.
FILE may contain either csc /doc XML or ECMA-335 XML.
When updating documentation, DIRECTORY is also the source directory.
This option is equivalent to specifying -L `dirname ASSEMBLY`.