2 .\" monodocer manual page.
3 .\" (C) 2006 Jonathan Pryor
5 .\" Jonathan Pryor (jonpryor@vt.edu)
7 .de Sp \" Vertical space (when we can't use .PP)
13 monodocer \- ECMA Documentation Format Support
19 .I \-assembly:ASSEMBLY
21 is a .NET assembly to generate documentation stubs for.
23 Specify a file path or the name of a GAC'd assembly.
26 Allow monodocer to delete members from documentation files.
27 The only members deleted are for members which are no longer present within
30 If a type is no longer present, the documentation file is
32 deleted, but is instead
39 Show program argument information.
42 Do not update members.
44 This will add documentation stubs for added types, but will
46 add or remove documentation for any members of any type (including any added
49 .I \-importslashdoc:FILE
51 is an XML file generated with the
53 C# compiler flag (e.g.
54 .I mcs -doc:foo.xml foo.cs
55 ). Import the member documentation contained within
57 into the documentation format used by monodoc.
61 is the name of the project this documentation is for.
67 file created at the directory specified by
70 This is used by some programs for title information (e.g.
74 .I \-namespace:NAMESPACE
75 Only update the types within the namespace
80 Include overridden methods in documentation.
82 This normally isn't necessary, as the Mono Documentation Browser will provide a
83 link to the base type members anyway, as will
85 if the base type is within the same assembly.
89 is the directory which will contain the new/updated documentation stubs.
92 Indent the XML files nicely.
95 Create a <since/> element for added types and members with the value
99 For example, when given
101 an element will be inserted into the
103 element for all added types and type members:
105 <since version="Gtk# 2.4" />
107 The Mono Documentation Browser and
109 will use this element to specify in which version a member was added.
112 Only create/update documentation for the type
117 When updating documentation, write the updated documentation files into the
123 Display version and licensing information.
126 \fBmonodocer\fR has been obsoleted by \fBmdoc\fR(1). See the
127 \fBmdoc-update\fR(1) man page.
130 is a program that creates XML documentation stubs in the ECMA Documentation
131 Format. It does not rely on documentation found within the source code.
137 Good documentation is frequently (a) verbose, and (b)
138 filled with examples. (For comparison, compare Microsoft .NET Framework
139 documentation, which is often a page or more of docs for each member, to
140 JavaDoc documentation, which can often be a sentence for each member.)
142 Inserting good documentation into the source code can frequently bloat the
143 source file, as the documentation can be longer than the actual method that is
148 In-source documentation formats (such as
150 ) have no support for multiple human languages. If you need to support more
151 than one human language for documentation purposes,
153 is useful as it permits each language to get its own directory, and
155 can add types/members for each separate documentation directory.
159 It's not unusual to have separate documentation and development teams. It's
160 also possible that the documentation team will have minimal experience with
161 the programming language being used. In such circumstances, inline
162 documentation is not desirable as the documentation team could inadvertantly
163 insert an error into the source code while updating the documentation.
164 Alternatively, you may not want the documentation team to have access to the
165 source code for security reasons.
167 allows the documentation to be kept
169 separate and distinct from the source code used to create the assembly.
173 documentation into something that can be consumed by the Mono
174 Documentation Browser (the desktop help browser, or the web interface
175 for it) it is necessary to compile the documentation into a packed
176 format. This is done with the mdassembler tool, for example, you
177 could use this toolchain like this:
180 $ monodocer -assembly:MyWidgets -path:generated_docs
181 $ mdassembler --ecma generated_docs -out:MyWidgets
184 The above would generate a MyWidgets.zip and a MyWidgets.tree that can
185 then be installed in the system. In addition to the two files (.zip
186 and .tree) you must provide a .sources file which describes where in
187 the help system the documentation should be hooked up, it is a very
188 simple XML file, like this:
191 <?xml version="1.0"?>
193 <source provider="ecma" basefile="MyWidgets" path="classlib-gnome"/>
197 The above configuration file describes that the documentation is in
198 ECMA format (the compiled version) that the base file name is
199 MyWidgets and that it should be hooked up in the "classlib-gnome" part
200 of the tree. If you want to look at the various nodes defined in the
201 documentation, you can look at monodoc.xml file which is typically
202 installed in /usr/lib/monodoc/monodoc.xml.
204 Once you have all of your files (.zip, .tree and .sources) you can
205 install them into the system with the following command:
208 $ cp MyWidgets.tree MyWidgets.zip MyWidgets.source `pkg-config monodoc --variable sourcesdir`
211 The above will copy the files into the directory that Monodoc has
212 registered (you might need root permissions to do this). The actual
213 directory is returned by the
217 String IDs are used to refer to a type or member of a type. String IDs are
218 documented in ECMA-334 3rd Edition, Annex E.3.1. They consist of a
219 .I member type prefix
220 , the full type name (namespace + name, separated by '.'), possibly followed
221 by the member name and other information.
223 Member type prefixes:
226 The String ID refers to an event. The event name follows the type name:
227 .I E:System.AppDomain.AssemblyLoad
230 The String ID refers to a field. The field name follows the type name:
231 .I F:System.Runtime.InteropServices.DllImportAttribute.SetLastError
234 Refers to a constructor or method. Constructors append
236 to the type name, while methods append the method name (with an optional count
237 of the number of generic parameters).
239 If the constructor or method take arguments, these are listed within
240 parenthesis after the constructor/method name:
242 .I M:System.Object..ctor
244 .I M:System.String..ctor(System.Char[])
246 .I M:System.String.Concat(System.Object)
248 .I M:System.Array.Sort``1(``0[])
250 .I M:System.Collections.Generic.List`1..ctor
252 .I M:System.Collections.Generic.List`1.Add(`0)
256 Refers to a namespace, e.g.
260 Refers to a property. If the property is an indexer or takes parameters,
261 the parameter types are appended to the property name and enclosed with
263 .I P:System.String.Length
265 .I P:System.String.Chars(System.Int32)
269 The String ID refers to a type, with the number of generic types appended:
272 .I T:System.Collections.Generic.List`1
274 To make matters more interesting, generic types & members have two
275 representations: the "unbound" representation (shown in examples above), in
276 which class names have the count of generic parameters appended to their name.
277 There is also a "bound" representation, in which the binding of generic
278 parameters is listed within '{' and '}'.
281 .I T:System.Collections.Generic.List`1
283 .I T:System.Collections.Generic.Dictionary`2
287 .I T:System.Collections.Generic.List{System.Int32}
288 .I T:System.Collections.Generic.Dictionary{System.String,System.Collections.Generic.List{System.Predicate{System.String}}}
291 As you can see, bound variants can be arbitrarily complex (just like
294 Furthermore, if a generic parameter is bound to the generic parameter of a
295 type or method, the "index" of the type/method's generic parameter is used
296 as the binding, so given
299 public static void Foo<T> (System.Predicate<T> predicate) {}
302 The String ID for this method is
303 .I M:FooType.Foo``1(System.Predicate{``0})
306 is the 0th generic parameter index which is bound to
307 .I System.Predicate<T>
309 .SH DOCUMENTATION FORMAT
311 generates documentation similar to the Ecma documentation format, as described
312 in ECMA-335 3rd Edition, Partition IV, Chapter 7.
314 The principal difference from the ECMA format is that each type gets its own
315 file, within a directory identical to the namespace of the type.
317 Most of the information within the documentation should
319 be edited. This includes the type name (
321 ), implemented interfaces (
323 ), member information (
324 .I /Type/Members/Member/@MemberName
326 .I /Type/Members/Member/MemberSignature
328 .I /Type/Members/Member/MemberType
330 .I /Type/Members/Member/Parameters
335 be modified are all elements with the text
337 , which are present under the
342 .I /Type/Members/Member/Docs
343 ). The contents of the
347 in semantics and structure to the inline C# documentation format, consisting
348 of these elements (listed in ECMA-334 3rd Edition, Annex E, Section 2). The
349 following are used within the element descriptions:
352 Refers to a class (or member) reference, and is a string in the format
353 described above in the
358 Non-XML text, and XML should not be nested.
362 Only XML elements should be nested (which indirectly may contain text), but
363 non-whitespace text should not be an immediate child node.
366 Free-form text and XML, so that other XML elements may be nested.
368 The following elements are used in documentation:
370 .I <block subset="SUBSET" type="TYPE">XML_TEXT</block>
371 Create a block of text, similar in concept to a paragraph, but is used to
372 create divisions within the text. To some extent, a <block/> is equivalent to
376 should always be the value
381 specifies the heading and formatting to use. Recognized types are:
384 Creates a section with the heading
389 Creates a section with the heading
394 Creates a section with the heading
395 .I Note to Inheritors
399 Creates a section with the heading
404 Set text in a code-like font (similar to the HTML <tt/> element).
406 .I <code lang="LANGUAGE">TEXT</code>
407 Display multiple lines of text in a code-like font (similar to the HTML <pre/>
410 is the language this code block is for. For example, if
416 will get syntax highlighting for the C# language within the Mono Documentation
419 .I <example>XML_TEXT</example>
420 Indicates an example that should be displayed specially. For example:
423 <para>An introductory paragraph.</para>
426 public static void Main ()
428 System.Console.WriteLine ("Hello, World!");
435 .I <exception cref="CREF">XML_TEXT</exception>
436 Identifies an exception that can be thrown by the documented member.
439 is a top-level element, and should be nested directly under the
444 is the exception type that is thrown, while
446 contains the circumstances that would cause
450 <exception cref="T:System.ArgumentNullException">
451 <paramref name="foo" /> was <see langword="null" />.
456 Create a list or table of items.
461 .I <listheader>XML</listheader>
463 .I <term>XML_TEXT</term>
465 .I <description>XML_TEXT</description>
471 <list type="bullet"> <!-- or type="number" -->
472 <item><term>Bullet 1</term></item>
473 <item><term>Bullet 2</term></item>
474 <item><term>Bullet 3</term></item>
482 <listheader> <!-- listheader bolds this row -->
483 <term>Column 1</term>
484 <description>Column 2</description>
485 <description>Column 3</description>
488 <term>Item 1-A</term>
489 <description>Item 1-B</description>
490 <description>Item 1-C</description>
493 <term>Item 2-A</term>
494 <description>Item 2-B</description>
495 <description>Item 2-C</description>
500 .I <para>XML_TEXT</para>
501 Insert a paragraph of
504 This is for use within other tags, such as
516 , above), and most other elements.
520 <para>This is a paragraph of text.</para>
523 .I <param name="NAME">XML_TEXT</param>
525 is a top-level element, and should be nested directly under the
529 Describes the parameter
531 of the current constructor, method, or property:
534 A <see cref="T:System.Int32" /> containing the number
535 of widgets to process.
539 .I <paramref name="NAME" />
546 as italic text, so it is frequently (ab)used as an equivalent to the
547 HTML <i/> element. See the
549 documentation (above) for an example.
551 .I <permission cref="CREF">XML_TEXT</permission>
552 Documentes the security accessibility requirements of the current member.
555 is a top-level element, and should be nested directly under the
560 is a type reference to the security permission required, while
562 is a description of why the permission is required.
564 <permission cref="T:System.Security.Permissions.FileIOPermission">
565 Requires permission for reading and writing files. See
566 <see cref="F:System.Security.Permissions.FileIOPermissionAccess.Read" />,
567 <see cref="F:System.Security.Permissions.FileIOPermissionAccess.Write" />.
571 .I <remarks>XML_TEXT</remarks>
572 Contains detailed information about a member.
575 is a top-level element, and should be nested directly under the
579 <remarks>Insert detailed information here.</remarks>
582 .I <returns>XML_TEXT</returns>
585 is a top-level element, and should be nested directly under the
589 Describes the return value of a method:
592 A <see cref="T:System.Boolean" /> specifying whether
593 or not the process can access
594 <see cref="P:Mono.Unix.UnixFileSystemInfo.FullName" />.
598 .I <see cref="CREF" />
599 Creates a link to the specified member within the current text:
601 <see cref="M:Some.Namespace.With.Type.Method" />
604 .I <seealso cref="CREF" />
607 is a top-level element, and should be nested directly under the
611 Allows an entry to be generated for the
615 to specify a link from within text.
617 <seealso cref="P:System.Exception.Message" />
620 .I <since version="VERSION" />
623 is a top-level element, and should be nested directly under the
627 Permits specification of which version introduced the specified type or
630 <since version="Gtk# 2.4" />
633 .I <summary>DESCRIPTION</summary>
636 is a top-level element, and should be nested directly under the
640 Provides a (brief!) overview about a type or type member.
642 This is usually displayed as part of a class declaration, and should be a
643 reasonably short description of the type/member. Use
645 for more detailed information.
647 .I <typeparam name="NAME">DESCRPITION</typeparam>
649 is a top-level element, and should be nested directly under the
653 This is used to describe type parameter for a generic type or generic method.
656 is the name of the type parameter, while
658 contains a description of the parameter (what it's used for, what restrictions
661 <typeparam name="T">The type of the underlying collection</typeparam>
665 Used to indicate that a word is a type parameter, for use within other text
670 <para>If <typeparamref name="T" /> is a struct, then...</para>
673 .I <value>DESCRIPTION</value>
675 is a top-level element, and should be nested directly under the
679 Allows a property to be described.
682 A <see cref="T:System.String" /> containing a widget name.
687 mdassembler(1), mdcs2ecma(1), mdnormalizer(1), mdvalidator(1), monodocs2html(1)
690 Visit http://lists.ximian.com/mailman/listinfo/mono-docs-list for details.
692 Visit http://www.mono-project.com for details