2 .\" mdoc-update manual page.
3 .\" (C) 2008 Jonathan Pryor
5 .\" Jonathan Pryor (jpryor@novell.com)
7 .de Sp \" Vertical space (when we can't use .PP)
13 mdoc update \- \fBmdoc\fR(5) documentation format support
15 \fBmdoc update\fR [OPTIONS]* ASSEMBLIES
17 \fBmdoc update\fR is responsible for the following:
20 Creating documentation stubs based on \fIASSEMBLIES\fR. The stub-creation
21 process will create new \fBmdoc\fR(5) XML files for each type within
22 \fIASSEMBLIES\fR, and provide documentation stubs for each member of those
26 Update documentation stubs based on \fIASSEMBLIES\fR. Existing \fBmdoc\fR(5)
27 documentation can be updated to reflect changes within \fIASSEMBLIES\fR, such
28 as added types and members, while preserving existing documentation.
30 In some limited circumstances, renames will be tracked, minimizing the
31 documentation burden when e.g. a parameter is renamed.
33 creates stubs and updates documentation in the \fBmdoc\fR(5)
34 documentation format from \fIASSEMBLIES\fR.
36 \fBmdoc update\fR does not rely on documentation found within source code.
38 See \fBmdoc\fR(1) and \fBmdoc\fR(5) for more information.
42 Allow \fBmdoc update\fR to delete members from documentation files.
43 The only members deleted are members which are no longer present within
44 \fIASSEMBLIES\fR and are not present in any other assembly versions.
46 If a type is no longer present, the documentation file is \fInot\fR
47 deleted, but is instead \fIrenamed\fR to have a \fB.remove \fR extension.
49 Version detection is done with the \fI//AssemblyVersion\fR elements; if there
50 are no \fI//AssemblyVersion\fR elements for a given \fI<Type>\fR or
51 \fI<Member/>\fR, then the \fI<Type>\fR will be renamed and/or the
52 \fI<Member/>\fR will be removed.
54 \fB\-\-exceptions\fR[=\fISOURCES\fR]
55 EXPERIMENTAL. This is not 100% reliable, but is intended to serve as an aid
56 for documentation writers.
58 Inspect member bodies to determine what exceptions can be generated from the
61 \fISOURCES\fR is an optional comma-separated list of the following sources
62 that should be searched for exceptions:
65 added Only generate <exception/> elements for members
66 added during the current program execution.
67 This keeps mdoc-update from re-generating
68 <exception/> elements for all members (and thus
69 prevents re-insertion for members that had the
70 <exception/> elements removed).
71 all Find exceptions created in the member itself,
72 references to members in the same assembly,
73 and references to members in dependent
75 asm Find exceptions created in the member itself and
76 references to members within the same assembly
78 depasm Find exceptions created in the member itself and
79 references to members within dependent
83 If \fISOURCES\fR isn't provided (the default), then only exceptions created
84 within the member itself will be documented.
86 LIMITATIONS: Exception searching is currently implemented by looking for the
87 exception types that are explicitly created based on the known compile-time
88 types. This has the following limitations:
93 This will not find exceptions which are implicit to the IL, such as
94 NullReferenceException and IndexOutOfRangeException.
97 This will find exceptions which are \fInot\fR thrown, e.g.
100 public void CreateAnException ()
102 Exception e = new Exception ();
108 This will not "follow" delegate and interface calls:
111 public void UsesDelegates ()
113 Func<int, int> a = x => {throw new Exception ();};
118 The function \fIUsesDelegates()\fR won't have any exceptions documented.
121 This will find exceptions which "cannot happen", such as
122 ArgumentNullExceptions for arguments which are "known" to be non-null:
127 B ("this parameter isn't null");
130 public void B (string s)
133 throw new ArgumentNullException ("s");
137 For the above, if \fB--exceptions=asm\fR is provided then \fIA()\fR will be
138 documented as throwing an ArgumentNullException, which cannot happen.
143 Specify a flag to alter behavior. Valid flags include:
147 .B no-assembly-versions
148 See the \fB-fno-assembly-versions\fR documentation, below.
152 \fB\-fno-assembly-versions\fR
153 Do not generate \fI/Type/AssemblyInfo/AssemblyVersion\fR and
154 \fI/Type/Members/Member/AssemblyInfo\fR elements.
156 This is useful to prevent "churn" during updates. Normally, if a type or
157 member hasn't changed but the assembly version has changed, then all types and
158 members will be updated to include a new \fI//AssemblyVersion\fR element, thus
159 increasing the amount of changes that need review before committing (assuming
160 all changes are actually reviewed before commit).
162 WARNING: This \fIwill\fR interact badly with the \fB--delete\fR option, as
163 \fB--delete\fR uses the \fI//AssemblyVersion\fR elements to track version
164 changes. Thus, if you have a member which is present in an early assembly
165 version and is removed in a subsequent assembly version, such as
166 \fISystem.Text.UTF8Encoding.GetBytes(string)\fR (which is present in .NET 1.0
167 but not in .NET 2.0), then the member will be removed when the
168 \fB--delete -fno-assembly-versions\fR options are specified, the member was
169 present in an earlier version of the assembly, and the current version of the
170 assembly does not contain the member.
172 Consequently, this option should \fIonly\fR be specified if types and members
173 will \fInever\fR be removed from an assembly.
175 \fB\-i\fR, \fB\-\-import\fR=\fIFILE\fR
176 Import documentation found within \fIFILE\fR.
178 \fIFILE\fR may contain either \fIcsc /doc\fR XML or \fIECMA-335\fR XML.
180 \fB\-o\fR, \fB\-\-out\fB=\fIDIRECTORY\fR
181 Place the generated stubs into \fIDIRECTORY\fR.
183 When updating documentation, \fIDIRECTORY\fR is also the source directory.
185 \fB\-\-since\fR=\fIVERSION\fR
186 When \fIupdating\fR documentation for an assembly, if a type or member is
187 encountered which didn't exist in the previous version of the assembly a
188 \fB<since version="\fR\fIVERSION\fR\fB"/>\fR element will be inserted.
190 \fB\-\-type\fR=\fITYPE\fR
191 Only update documentation for the type \fITYPE\fR.
193 .B \-h, \-?, \-\-help
194 Display a help message and exit.
203 Visit http://lists.ximian.com/mailman/listinfo/mono-docs-list for details.
205 Visit http://www.mono-project.com for details