1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755
|
* MonoDoc XML Tag Reference
** Introduction
<em>
[This documentation is in progress. Comments to
<a href="mailto:jbarn@httcb.net">jbarn@httcb.net</a> and/or
<a href="mailto:mono-docs-list@ximian.com">mono-docs-list@ximian.com</a>.]
</em>
MonoDoc XML, our format for multilingual API documentation stored outside of
source files, is very similar to the output of Microsoft's csc /doc. Minor
alterations have been made to ease human parsing and hand-editing, but
the majority of the tags are identical. In fact, many of the descriptions
and examples below are taken from the ECMA C# Language Specification with
little or no alteration.
This document provides a list of all available MonoDoc XML tags, with
syntax and examples. A complete example can be found in
<a href="#appendix-a">Appendix A</a>, and both a <a href="#">DTD</a> and
<a href="#">XSD schema</a> will be available very shortly.
** MonoDoc XML Tags
<dl>
<dt><code><a href="#c"><c></a></code></dt>
<dd>Mark short sections of text as code.</dd>
<dt><code><code><a href="#code"><code></a></code></dt></code>
<dd>Mark one or more lines as code or output.</dd>
<dt><code><a href="#doc"><doc></a></dt></code>
<dd>Root element of documentation XML.</dd>
<dt><code><a href="#event"><event></a></dt></code>
<dd>Describe an event.</dd>
<dt><code><a href="#example"><example></a></dt></code>
<dd>An example.</dd>
<dt><code><a href="#exception"><exception></a></dt></code>
<dd>Specify an exception a method can throw.</dd>
<dt><code><a href="#field"><field></a></dt></code>
<dd>Describe a field.</dd>
<dt><code><a href="#list"><list></a></dt></code>
<dd>Create a list or table.</dd>
<dt><code><a href="#method"><method></a></dt></code>
<dd>Describe a method.</dd>
<dt><code><a href="#para"><para></a></dt></code>
<dd>Allow text to be structured in paragraphs.</dd>
<dt><code><a href="#param"><param></a></dt></code>
<dd>Specify a parameter for a method.</dd>
<dt><code><a href="#paramref"><paramref></a></dt></code>
<dd>Mark a word as a parameter.</dd>
<dt><code><a href="#permission"><permission></a></dt></code>
<dd>Define the access level of a member.</dd>
<dt><code><a href="#property"><property></a></dt></code>
<dd>Describe a property.</dd>
<dt><code><a href="#remarks"><remarks></a></dt></code>
<dd>Provide verbose information for a type or member.</dd>
<dt><code><a href="#returns"><returns></a></dt></code>
<dd>Specify the return value of a method.</dd>
<dt><code><a href="#see"><see></a></dt></code>
<dd>Specify a link.</dd>
<dt><code><a href="#seealso"><seealso></a></dt></code>
<dd>Specify a 'see also' entry.</dd>
<dt><code><a href="#summary"><summary></a></dt></code>
<dd>Provide a brief (usually one sentence) description of a member or type.</dd>
<dt><code><a href="#type"><type></a></dt></code>
<dd>Describe a type.</dd>
</dl>
** Definitions and Examples
*** <a name="c"><c></a>
This tag can be used to mark short, inline fragments of text that should
be considered source code or program output. User agents should render
this tag in a special -- likely monospace -- font. For larger sections,
use <a href="#code"><code><code></code></a>.
**** Syntax
<pre>
<c>code or output text</c>
</pre>
**** Example
<pre>
<remarks>
Class <c>Point</c> models a point in two-dimensional space.
</remarks>
</pre>
*** <a name="code"><code></a>
This tag can be used to mark one or more lines of text as source code or
program output. User agents should render this tag in a special (likely
monospace) font, and preserve both whitespace and newlines.
**** Syntax
<code><code>source or program output</code></code>
**** Example
<pre>
<summary>
This method changes the point's location by the given
x- and y-offsets.
<example lang="C#">
A C# example:
<code>
Point p = new Point(3, 5);
p.Translate(-1, 3);
// p == (2, 8);
</code>
</example>
</summary>
</pre>
*** <a name="doc"><doc></a>
This tag is the root element of the documentation file. It can contain
any number of <type> elements.
**** Syntax
<code><doc lang="language" assembly="assembly">typedocs</doc></code>
<blockquote>
<em>lang="language"</em><br />
The two-letter ISO code that specifies what language the contained
documentation is written in.
</blockquote>
**** Example
<pre>
<doc lang="en">
<type name="Graphics.Point">
<!-- ... -->
</type>
</doc>
</pre>
*** <a name="event"><event></a>
This tag documents an event.
**** Syntax
<code><event name="eventname">documentation</event></code>
<blockquote>
<em>name="eventname"</em><br />
The name of the event being documented.
</blockquote>
**** Example
<pre>
<event name="Click">
<summary>
Occurs when the control is clicked.
</summary>
<data>
The event handler receives an argument of type EventArgs
containing data related to this event.
</data>
<remarks>
<para>The ControlStyles.StandardClick style must be set
for this event to be raised.</para>
<para>For more information about handling events, see
Consuming Events.</para>
</remarks>
</event>
</pre>
*** <a name="example"><example></a>
This tag marks a section of text as an example, and optionally specifies
what programming language <code><a href="#code"><code></a></code> portions of the example are written in.
**** Syntax
<code><example lang="language">example text and code</example></code>
<blockquote>
<em>lang="language"</em><br />
(optional) The name of the programming language <code><a href="#code"><code></a></code> blocks in this example
use. This information can be used by user agents to provide
intelligent access to examples in multiple languages.
</blockquote>
**** Example
See <code><a href="#code"><code><a/></code> for an example.
*** <a name="exception"><exception></a>
This tag provides a way to specify the exceptions a method can throw.
**** Syntax
<code><exception cref="exception-type">description</exception></code>
<blockquote>
<em>cref="exception-type"</em><br />
The name of an exception type.
</blockquote>
**** Example
<pre>
<exception cref="System.IO.FileNotFoundException">
Thrown when the requested file is not found.
</exception>
</pre>
*** <a name="field"><field></a>
This tag is used to describe a field.
**** Syntax
<code><field name="fieldname">documentation</field></code>
<blockquote>
<em>name="fieldname"</em><br />
The name of the field being documented.
</blockquote>
**** Example
<pre>
<field name="x">
<summary>
Instance variable <c>x</c> represents the point's
x-coordinate.
</summary>
</field>
</pre>
*** <a name="list"><list></a>
This tag is used to create a list or table of items. It may contain a
<code><listheader></code> block to define the heading row of either a table or
definition list. (When defining a table, only an entry for 'term' in the
heading need be supplied.)
Each item in the list is specified with an <code><item></code> block. When creating a
definition list, both <code><term></code> and <code><description></code> must be specified.
However, for a table, bulleted list, or numbered list, only <code><description></code>
need be specified.
**** Syntax
<pre>
<list type="bullet" | "number" | "table">
<listheader>
<term>term</term>
<description>description</description>
</listheader>
<item>
<term>term</term>
<description>description</description>
</item>
...
</list>
</pre>
<blockquote>
<em>term</em><br />
The term to define, whose definition is in <code><description></code>.
<br /><br />
<em>description</em><br />
Either an item in a bullet or numbered list, or the definition of a <code><term></code>.
</blockquote>
**** Example
<pre>
<list type="bullet">
<item>
<description>Item 1</description>
</item>
<item>
<description>Item 2</description>
</item>
</list>
</pre>
*** <a name="method"><method></a>
This tag is the overall containing tag for documenting a method.
**** Syntax
<code><method name="methodname">documentation</method></code>
**** Example
<pre>
<method name="op_Equality(Graphics.Point,Graphics.Point)">
<summary>
This operator determines whether two points have
the same location.
</summary>
<param name="p1">
<c>p1</c> is the first Point to be compared.
</param>
<param name="p2">
<c>p2</c> is the second Point to be compared.
</param>
<returns>
True if the points have the same location and they
have the exact same type; otherwise, false.
</returns>
<seealso cref="Equals(System.Object)" />
<seealso cref="op_Inequality(Graphics.Point,Graphics.Point)" />
</method>
</pre>
*** <a name="para"><para></a>
This tag is for use inside other tags such as <code><remarks></code> or <code><returns></code>, and
allows text to be structured into paragraphs.
**** Syntax
<code><para>text</para></code>
**** Example
<pre>
<summary>
<para>
This is the entry point of the <c>Point</c> class testing
program.
</para>
<para>
This program tests each method and operator, and
is intended to be run after any non-trivial maintenance has
been performed on the <c>Point</c> class.
</para>
</summary>
</pre>
*** <a name="param"><param></a>
This tag is used to describe a parameter for a method, constructor, or
indexer.
**** Syntax
<code><param name="name">description</param></code>
<blockquote>
<em>name</em><br />
The name of the parameter.
</blockquote>
**** Example
<pre>
<summary>
This is the entry point of the <c>Point</c>
class.
</summary>
<param name="xor"><c>xor</c> is the new x-coordinate.</param>
<param name "yor"><c>yor</c> is the new y-coordinate.</param>
</pre>
*** <a name="paramref"><paramref></a>
This tag is used to indicate that a word is a parameter. User agents
could use this information for special formatting or hyperlink insertion.
**** Syntax
<code><paramref name="name" /></code>
<blockquote>
<em>name</em><br />
The name of the parameter.
</blockquote>
**** Example
<pre>
<summary>
This constructor initializes the new Point to
(<paramref name="xor" />,<paramref name="yor" />).
</summary>
<param name="xor"><c>xor</c> is the new x-coordinate.</param>
<param name "yor"><c>yor</c> is the new y-coordinate.</param>
</pre>
*** <a name="permission"><permission></a>
This tag allows the security accessibility of a member to be documented.
**** Syntax
<code><permission cref="member">description</permission></code>
<blockquote>
<em>cref="member"</em><br />
The name of a member.</br>
</blockquote>
**** Example
<pre>
<permission cref="System.Security.PermissionSet">
Everyone can access this method.
</permission>
</pre>
*** <a name="property"><property></a>
This tag is the overall containing tag for documenting a property.
**** Syntax
<code><property name="propertyname">documentation</property></code>
<blockquote>
<em>name="propertyname"</em><br />
The name of the property.
</blockquote>
**** Example
<pre>
<property name="X">
<summary>
Gets or sets the point's x-coordinate.
<value>
The point's x-coordinate.
</value>
</property>
</pre>
*** <a name="remarks"><remarks></a>
This tag contains extended discussion and information about a member or
a type. <em>[jbarn: This differs from both the ECMA docs and
portions of Microsoft's documentation, but seems consistent with both
common usage, and, more importantly, NDoc convention.]</em>
**** Syntax
<code><remarks>description</remarks></code>
**** Example
<pre>
<type name="Graphics.Point">
<summary>
Models a point in a two-dimensional plane.
</summary>
<remarks>
Herein I might have an extended discussion of
the validity of Cartesian coordinate systems,
with examples pro and con, and perhaps
some code.
</remarks>
<!-- ... -->
</type>
</pre>
*** <a name="returns"><returns></a>
This tag is used to describe the return value of a method.
**** Syntax
<code><returns>description</returns></code>
**** Example
<pre>
<method name="op_Inequality(Graphics.Point,Graphics.Point)">
<summary>
This operator determines whether two points have the
same location.
</summary>
<param name="p1"><c>p1</c> is the first Point to be compared.</param>
<param name="p2"><c>p2</c> is the second Point to be compared.</param>
<returns>
True if the points do not have the same location and they
have the exact same type; otherwise, false.
</returns>
</method>
</pre>
*** <a name="see"><see></a>
This tag allows a link to be specified within documentation text. (Use
<code><seealso></code> to indicate links that should appear in a 'See Also' section.)
**** Syntax
<code><see cref="destination" /></code>
<blockquote>
<em>cref="destination"</em><br />
A destination, such as a type or a member of a type.
</blockquote>
**** Example
<pre>
<summary>
This method changes the point's location to the given
coordinates. This is an asinine way to insert a link,
but <see cref="Equals(Object)" /> to understand
how points are compared.
</summary>
</pre>
*** <a name="seealso"><seealso></a>
This tag allows an entry to be generated for the 'See Also' section. (Use
<code><see></code> to specify a link from within text.)
**** Syntax
<code><seealso cref="destination" /></code>
<blockquote>
<em>cref="destination"</em><br />
A destination, such as a type or a member of a type.
</blockquote>
**** Example
<pre>
<summary>
This method determines whether two Points have the
same location.
</summary>
<seealso cref="op_Equality(Graphics.Point,Graphics.Point)" />
<seealso cref="op_Inequality(Graphics.Point,Graphics.Point" />
</pre>
*** <a name="summary"><summary></a>
This tag contains a short summary of a member or type,
often one sentence. <em>[jbarn: This differs from both the ECMA docs and
portions of Microsoft's documentation, but seems consistent with both
common usage, and, more importantly, NDoc convention.]</em>
**** Syntax
<code><summary>description</summary></code>
**** Example
<pre>
<summary>
This is the entry point of the <c>Point</c> class testing
program.
</summary>
<remarks>
This program tests each method an operator, and is intended
to be run after any non-trivial maintenance is performed
on the <c>Point</c> class.
</remarks>
</pre>
*** <a name="type"><type></a>
This tag is the overall containing tag for documenting a type.
**** Syntax
<code><type name="typename" assembly="assemblyname">documentation</type></code>
<blockquote>
<em>name="typename"</em><br />
The name of the type being documented.
<br /><br />
<em>assembly="assemblyname"</em><br />
The assembly this type resides in. This attribute is not required for nested types.
</blockquote>
**** Example
<pre>
<type name="Graphics.Point" assembly="Point">
<summary>
Models a point in two-dimensional space.
</summary>
<!-- members -->
<field name="x">
<summary>
Represents the point's x-coordinate.
</summary>
</field>
</type>
</pre>
** <a name="appendix-a">Appendix A: Complete Example</a>
<em>[jbarn: Please, please, don't take the human-readable portions of
this example to be good guidelines for writing your own documentation.
this XML is intended only to show structure.]</em>
<pre>
<?xml version="1.0" encoding="UTF-8"?>
<doc lang="en">
<type name="Graphics.Point" assembly="Point">
<summary>
Models a point in a two-dimensional plane.
</summary>
<remarks>
No useful remarks.
</remarks>
<!-- fields -->
<field name="x">
<summary>
Instance variable <c>x</c> represents the point's x-coordinate.
</summary>
</field>
<field name="y">
<summary>
Instance variable <c>y</c> represents the point's y-coordinate.
</summary>
</field>
<!-- methods -->
<method name="#ctor">
<summary>
Initializes the new point to <c>(0,0)</c>.
</summary>
</method>
<method name="#ctor(System.Int32,System.Int32)">
<summary>
Initializes the new Point to (<paramref name="xor" />,<paramref name="yor" />).
</summary>
<param name="xor"><c>xor</c> is the new x-coordinate.</param>
<param name="yor"><c>yor</c> is the new y-coordinate.</param>
</method>
<method name="Move(System.Int32,System.Int32)">
<summary>
This method changes the point's location to the given coordinates.
</summary>
<param name="xor"><c>xor</c> is the new x-coordinate.</param>
<param name="yor"><c>yor</c> is the new y-coordinate.</param>
<seealso cref="Translate(System.Int32,System.Int32)" />
</method>
<method name="Translate(System.Int32,System.Int32)">
<summary>This method changes the point's location by the given x- and y-offsets.</summary>
<remarks>
<example lang="C#">
A C# example:
<code>
Point p = new Point(3, 5);
p.Translate(-1, 3);
</code>
This code results in <c>p</c> having the value (2,8).
</example>
</remarks>
<param name="xor"><c>xor</c> is the relative x-offset.</param>
<param name="yor"><c>yor</c> is the relative y-offset.</param>
<seealso cref="Move(System.Int32,System.Int32)" />
</method>
<method name="Equals(System.Object)">
<summary>This method determines whether two points have the same location.</summary>
<param name="o"><c>o</c> is the object to be compared to the current object.</param>
<returns>True if the Points have the same location and they have the exact same
type; otherwise, false.</returns>
<seealso cref="op_Equality(Graphics.Point,Graphics.Point)" />
<seealso cref="op_Inequality(Graphics.Point,Graphics.Point" />
</method>
<method name="ToString">
<summary>Report a point's location as a string.</summary>
<returns>A string representing a point's location, in the form (x,y), without any
leading, trailing, or embedded whitespace.</returns>
</method>
<method name="op_Equality(Graphics.Point,Graphics.Point)">
<summary>This operator determines whether two points have the same location.</summary>
<param name="p1"><c>p1</c> is the first Point to be compared.</param>
<param name="p2"><c>p2</c> is the second Point to be compared.</param>
<returns>True if the points have the same location and they have the exact same
type; otherwise, false.</returns>
<seealso cref="Equals(System.Object)" />
<seealso cref="op_Inequality(Graphics.Point,Graphics.Point)" />
</method>
<method name="op_Inequality(Graphics.Point,Graphics.Point)">
<summary>This operator determines whether two points have the same location.</summary>
<param name="p1"><c>p1</c> is the first Point to be compared.</param>
<param name="p2"><c>p2</c> is the second Point to be compared.</param>
<returns>True if the points do not have the same location and they have the exact same
type; otherwise, false.</returns>
<seealso cref="Equals(System.Object)" />
<seealso cref="op_Equality(Graphics.Point,Graphics.Point)" />
</method>
<method name="Main">
<summary>
This is the entry point of the Point class testing program.
</summary>
<remarks>
<para>This program tests each method and operator, and is intended to be run after
any non-trivial maintenance has been performed on the Point class.</para>
</remarks>
</method>
<!-- properties -->
<property name="X">
<value>Property <c>X</c> represents the point's x-coordinate.</value>
</property>
<property name="Y">
<value>Property <c>y</c> represents the point's y-coordinate.</value>
</property>
</type>
</doc>
</pre>
|