Welcome to mirror list, hosted at ThFree Co, Russian Federation.

monodocer.1 « man - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8bbc34cb239284d9e71ff9bd8f078fcd93bde9cc (plain)
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
.\" 
.\" monodocer manual page.
.\" (C) 2006 Jonathan Pryor
.\" Author:
.\"   Jonathan Pryor (jonpryor@vt.edu)
.\"
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.TH "monodocer" 1
.SH NAME
monodocer \- ECMA Documentation Format Support
.SH SYNOPSIS
.B monodocer
[OPTIONS]*
.SH OPTIONS
.TP
.I \-assembly:ASSEMBLY
.I ASSEMBLY
is a .NET assembly to generate documentation stubs for.
.Sp
Specify a file path or the name of a GAC'd assembly.
.TP
.I \-delete
Allow monodocer to delete members from documentation files.  
The only members deleted are for members which are no longer present within
the assembly.
.Sp
If a type is no longer present, the documentation file is
.I not
deleted, but is instead
.I renamed
to have a
.B .remove 
extension.
.TP
.I \-?, \-help
Show program argument information.
.TP
.I \-ignoremembers
Do not update members.
.Sp
This will add documentation stubs for added types, but will
.I not
add or remove documentation for any members of any type (including any added
types).
.TP
.I \-importslashdoc:FILE
.I FILE
is an XML file generated with the 
.B /doc:FILE
C# compiler flag (e.g.
.I mcs -doc:foo.xml foo.cs
).  Import the member documentation contained within
.I FILE
into the documentation format used by monodoc.
.TP
.I \-name:NAME
.I NAME
is the name of the project this documentation is for.
.Sp
This sets the 
.I /Overview/Title
element within the 
.I index.xml
file created at the directory specified by
.I -path
\&.
This is used by some programs for title information (e.g.
.I monodocs2html
).
.TP
.I \-namespace:NAMESPACE
Only update the types within the namespace
.I NAMESPACE
\&.
.TP
.I \-overrides
Include overridden methods in documentation.
.Sp
This normally isn't necessary, as the Mono Documentation Browser will provide a
link to the base type members anyway, as will
.I monodocs2html
if the base type is within the same assembly.
.TP
.I \-path:OUTPUT_DIR
.I OUTPUT_DIR
is the directory which will contain the new/updated documentation stubs.
.TP
.I \-pretty
Indent the XML files nicely.
.TP
.I \-since:SINCE
Create a <since/> element for added types and members with the value 
.I SINCE
\&.
.Sp
For example, when given
.I -since:"Gtk# 2.4"
an element will be inserted into the 
.I Docs
element for all added types and type members:
.nf
	<since version="Gtk# 2.4" />
.fi
The Mono Documentation Browser and 
.I monodocs2html
will use this element to specify in which version a member was added.
.TP
.I \-type:TYPE
Only create/update documentation for the type
.I TYPE
\&.
.TP
.I \-updateto:PATH
When updating documentation, write the updated documentation files into the
directory 
.I PATH
\&.
.TP
.I \-V, \-version
Display version and licensing information.
.PP
.SH DESCRIPTION
\fBmonodocer\fR has been obsoleted by \fBmdoc\fR(1).  See the
\fBmdoc-update\fR(1) man page.
.PP
.I monodocer
is a program that creates XML documentation stubs in the ECMA Documentation
Format.  It does not rely on documentation found within the source code.
.PP
The advantages are:
.TP
.I *
.B Code readability.
Good documentation is frequently (a) verbose, and (b)
filled with examples.  (For comparison, compare Microsoft .NET Framework
documentation, which is often a page or more of docs for each member, to
JavaDoc documentation, which can often be a sentence for each member.)
.Sp
Inserting good documentation into the source code can frequently bloat the
source file, as the documentation can be longer than the actual method that is
being documented.
.TP
.I *
.B Localization.
In-source documentation formats (such as 
.B /doc
) have no support for multiple human languages.  If you need to support more
than one human language for documentation purposes, 
.I monodocer
is useful as it permits each language to get its own directory, and 
.I monodocer
can add types/members for each separate documentation directory.
.TP
.I *
.B Administration.
It's not unusual to have separate documentation and development teams.  It's
also possible that the documentation team will have minimal experience with
the programming language being used.  In such circumstances, inline
documentation is not desirable as the documentation team could inadvertantly
insert an error into the source code while updating the documentation.
Alternatively, you may not want the documentation team to have access to the
source code for security reasons.
.I monodocer
allows the documentation to be kept 
.I completely
separate and distinct from the source code used to create the assembly.
.PP
To turn the 
.I monodocer 
documentation into something that can be consumed by the Mono
Documentation Browser (the desktop help browser, or the web interface
for it) it is necessary to compile the documentation into a packed
format.  This is done with the mdassembler tool, for example, you
could use this toolchain like this:
.nf

	$ monodocer -assembly:MyWidgets -path:generated_docs
	$ mdassembler --ecma generated_docs -out:MyWidgets

.fi
The above would generate a MyWidgets.zip and a MyWidgets.tree that can
then be installed in the system.   In addition to the two files (.zip
and .tree) you must provide a .sources file which describes where in
the help system the documentation should be hooked up, it is a very
simple XML file, like this:
.nf

<?xml version="1.0"?>
<monodoc>
  <source provider="ecma" basefile="MyWidgets" path="classlib-gnome"/>
</monodoc>

.fi
The above configuration file describes that the documentation is in
ECMA format (the compiled version) that the base file name is
MyWidgets and that it should be hooked up in the "classlib-gnome" part
of the tree.   If you want to look at the various nodes defined in the
documentation, you can look at monodoc.xml file which is typically
installed in /usr/lib/monodoc/monodoc.xml.   
.PP
Once you have all of your files (.zip, .tree and .sources) you can
install them into the system with the following command:
.nf

        $ cp MyWidgets.tree MyWidgets.zip MyWidgets.source `pkg-config monodoc --variable sourcesdir`
  
.fi
The above will copy the files into the directory that Monodoc has
registered (you might need root permissions to do this).   The actual
directory is returned by the 
.I pkg-config 
invocation.
.SH STRING ID FORMAT
String IDs are used to refer to a type or member of a type.  String IDs are
documented in ECMA-334 3rd Edition, Annex E.3.1.  They consist of a 
.I member type prefix
, the full type name (namespace + name, separated by '.'), possibly followed
by the member name and other information.
.PP
Member type prefixes:
.TP
.I "E:"
The String ID refers to an event.  The event name follows the type name:
.I E:System.AppDomain.AssemblyLoad
.TP
.I "F:"
The String ID refers to a field.  The field name follows the type name:
.I F:System.Runtime.InteropServices.DllImportAttribute.SetLastError
.TP
.I "M:"
Refers to a constructor or method.  Constructors append 
.I .ctor
to the type name, while methods append the method name (with an optional count
of the number of generic parameters).
.Sp
If the constructor or method take arguments, these are listed within
parenthesis after the constructor/method name:
.Sp
.I M:System.Object..ctor
,
.I M:System.String..ctor(System.Char[])
,
.I M:System.String.Concat(System.Object)
,
.I M:System.Array.Sort``1(``0[])
,
.I M:System.Collections.Generic.List`1..ctor
,
.I M:System.Collections.Generic.List`1.Add(`0)
\&.
.TP
.I "N:"
Refers to a namespace, e.g.
.I N:System
.TP
.I "P:"
Refers to a property.  If the property is an indexer or takes parameters, 
the parameter types are appended to the property name and enclosed with
parenthesis:
.I P:System.String.Length
,
.I P:System.String.Chars(System.Int32)
\&.
.TP
.I "T:"
The String ID refers to a type, with the number of generic types appended:
.I T:System.String
,
.I T:System.Collections.Generic.List`1
.PP
To make matters more interesting, generic types & members have two
representations: the "unbound" representation (shown in examples above), in
which class names have the count of generic parameters appended to their name.
There is also a "bound" representation, in which the binding of generic
parameters is listed within '{' and '}'.
.PP
.B Unbound:
.I T:System.Collections.Generic.List`1
,
.I T:System.Collections.Generic.Dictionary`2
\&.
.PP
.B Bound:
.I T:System.Collections.Generic.List{System.Int32}
.I T:System.Collections.Generic.Dictionary{System.String,System.Collections.Generic.List{System.Predicate{System.String}}}
\&.
.PP
As you can see, bound variants can be arbitrarily complex (just like
generics).
.PP
Furthermore, if a generic parameter is bound to the generic parameter of a
type or method, the "index" of the type/method's generic parameter is used 
as the binding, so given
.nf
	class FooType {
	  public static void Foo<T> (System.Predicate<T> predicate) {}
	}
.fi
The String ID for this method is
.I M:FooType.Foo``1(System.Predicate{``0})
, as 
.I ``0
is the 0th generic parameter index which is bound to 
.I System.Predicate<T>
\&.
.SH DOCUMENTATION FORMAT
.I monodocer
generates documentation similar to the Ecma documentation format, as described 
in ECMA-335 3rd Edition, Partition IV, Chapter 7.
.PP
The principal difference from the ECMA format is that each type gets its own
file, within a directory identical to the namespace of the type.
.PP
Most of the information within the documentation should
.I not
be edited.  This includes the type name (
.I /Type/@FullName
), implemented interfaces (
.I /Type/Interfaces
), member information (
.I /Type/Members/Member/@MemberName
,
.I /Type/Members/Member/MemberSignature
,
.I /Type/Members/Member/MemberType
,
.I /Type/Members/Member/Parameters
, etc.).
.PP
What 
.I should
be modified are all elements with the text
.I To be added.
, which are present under the 
.I //Docs
elements (e.g. 
.I /Type/Docs
,
.I /Type/Members/Member/Docs
).  The contents of the
.I Docs
element is
.I identical
in semantics and structure to the inline C# documentation format, consisting
of these elements (listed in ECMA-334 3rd Edition, Annex E, Section 2).  The
following are used within the element descriptions:
.TP
.I CREF
Refers to a class (or member) reference, and is a string in the format
described above in the
.I STRING ID FORMAT
section.
.TP
.I TEXT
Non-XML text, and XML should not be nested.
.I
.TP
.I XML
Only XML elements should be nested (which indirectly may contain text), but
non-whitespace text should not be an immediate child node.
.TP
.I XML_TEXT
Free-form text and XML, so that other XML elements may be nested.
.PP
The following elements are used in documentation:
.TP
.I <block subset="SUBSET" type="TYPE">XML_TEXT</block>
Create a block of text, similar in concept to a paragraph, but is used to
create divisions within the text.  To some extent, a <block/> is equivalent to
the HTML <h2/> tag.
.Sp
.I SUBSET
should always be the value
.I "none"
\&.
.Sp
.I TYPE
specifies the heading and formatting to use.  Recognized types are:
.Sp
.I behaviors
Creates a section with the heading
.I Operation
\&.
.Sp
.I note
Creates a section with the heading 
.I Note:
\&.
.Sp
.I overrides
Creates a section with the heading
.I Note to Inheritors
\&.
.Sp
.I usage
Creates a section with the heading
.I Usage
\&.
.TP
.I <c>XML_TEXT</c>
Set text in a code-like font (similar to the HTML <tt/> element).
.TP
.I <code lang="LANGUAGE">TEXT</code>
Display multiple lines of text in a code-like font (similar to the HTML <pre/>
element).
.I LANGUAGE
is the language this code block is for.  For example, if
.I LANGUAGE
is 
.B C#
, then 
.I TEXT
will get syntax highlighting for the C# language within the Mono Documentation
Browser.
.TP
.I <example>XML_TEXT</example>
Indicates an example that should be displayed specially.  For example:
.nf
	<example>
	  <para>An introductory paragraph.</para>
	  <code lang="C#">
	    class Example {
	      public static void Main ()
	      {
	        System.Console.WriteLine ("Hello, World!");
	      }
	    }
	  </code>
	</example>
.fi
.TP
.I <exception cref="CREF">XML_TEXT</exception>
Identifies an exception that can be thrown by the documented member.
.Sp
.I <exception/>
is a top-level element, and should be nested directly under the 
.I <Docs/>
element.
.Sp
.I CREF
is the exception type that is thrown, while
.I XML_TEXT
contains the circumstances that would cause 
.I CREF
to be thrown.
.nf
	<exception cref="T:System.ArgumentNullException">
	  <paramref name="foo" /> was <see langword="null" />.
	</exception>
.fi
.TP
.I <list>XML</list>
Create a list or table of items.  
.I <list/>
makes use of nested
.I <item>XML</item>
,
.I <listheader>XML</listheader>
,
.I <term>XML_TEXT</term>
, and
.I <description>XML_TEXT</description>
elements.
.Sp
.I Lists
have the syntax:
.nf
	<list type="bullet"> <!-- or type="number" -->
	  <item><term>Bullet 1</term></item>
	  <item><term>Bullet 2</term></item>
	  <item><term>Bullet 3</term></item>
	</list>
.fi
.Sp
.I Tables
have the syntax:
.nf
	<list type="table">
	  <listheader> <!-- listheader bolds this row -->
	    <term>Column 1</term>
	    <description>Column 2</description>
	    <description>Column 3</description>
	  </listheader>
	  <item>
	    <term>Item 1-A</term>
	    <description>Item 1-B</description>
	    <description>Item 1-C</description>
	  </item>
	  <item>
	    <term>Item 2-A</term>
	    <description>Item 2-B</description>
	    <description>Item 2-C</description>
	  </item>
	</list>
.fi
.TP
.I <para>XML_TEXT</para>
Insert a paragraph of
.I XML_TEXT
 .
This is for use within other tags, such as 
.I <example/>
,
.I <remarks/>
,
.I <returns/>
,
.I <term/>
and 
.I <description/>
(see 
.I <list/>
, above), and most other elements.
.Sp
For example,
.nf
	<para>This is a paragraph of text.</para>
.fi
.TP
.I <param name="NAME">XML_TEXT</param>
.I <param/>
is a top-level element, and should be nested directly under the 
.I <Docs/>
element.
.Sp
Describes the parameter
.I NAME
of the current constructor, method, or property:
.nf
	<param name="count">
	  A <see cref="T:System.Int32" /> containing the number
	  of widgets to process.
	</param>
.fi
.TP
.I <paramref name="NAME" />
Indicates that
.I NAME
is a parameter.
.Sp
This usually renders 
.I NAME
as italic text, so it is frequently (ab)used as an equivalent to the
HTML <i/> element.  See the 
.I <exception/>
documentation (above) for an example.
.TP
.I <permission cref="CREF">XML_TEXT</permission>
Documentes the security accessibility requirements of the current member.
.Sp
.I <permission/>
is a top-level element, and should be nested directly under the 
.I <Docs/>
element.
.Sp
.I CREF
is a type reference to the security permission required, while
.I XML_TEXT
is a description of why the permission is required.
.nf
	<permission cref="T:System.Security.Permissions.FileIOPermission">
	  Requires permission for reading and writing files. See 
	  <see cref="F:System.Security.Permissions.FileIOPermissionAccess.Read" />, 
	  <see cref="F:System.Security.Permissions.FileIOPermissionAccess.Write" />.
	</permission>
.fi
.TP
.I <remarks>XML_TEXT</remarks>
Contains detailed information about a member.
.Sp
.I <remarks/>
is a top-level element, and should be nested directly under the 
.I <Docs/>
element.
.nf
	<remarks>Insert detailed information here.</remarks>
.fi
.TP
.I <returns>XML_TEXT</returns>
.Sp
.I <remarks/>
is a top-level element, and should be nested directly under the 
.I <Docs/>
element.
.Sp
Describes the return value of a method:
.nf
	<returns>
	  A <see cref="T:System.Boolean" /> specifying whether 
	  or not the process can access 
	  <see cref="P:Mono.Unix.UnixFileSystemInfo.FullName" />.
	</returns>
.fi
.TP
.I <see cref="CREF" />
Creates a link to the specified member within the current text:
.nf
	<see cref="M:Some.Namespace.With.Type.Method" />
.fi
.TP
.I <seealso cref="CREF" />
.Sp
.I <seealso/>
is a top-level element, and should be nested directly under the 
.I <Docs/>
element.
.Sp
Allows an entry to be generated for the 
.I See Also
subclause.  Use 
.I <see/>
to specify a link from within text.
.nf
	<seealso cref="P:System.Exception.Message" />
.fi
.TP
.I <since version="VERSION" />
.Sp
.I <since/>
is a top-level element, and should be nested directly under the 
.I <Docs/>
element.
.Sp
Permits specification of which version introduced the specified type or
member.
.nf
	<since version="Gtk# 2.4" />
.fi
.TP
.I <summary>DESCRIPTION</summary>
.Sp
.I <summary/>
is a top-level element, and should be nested directly under the 
.I <Docs/>
element.
.Sp
Provides a (brief!) overview about a type or type member.
.Sp
This is usually displayed as part of a class declaration, and should be a
reasonably short description of the type/member.  Use
.I <remarks/>
for more detailed information.
.TP
.I <typeparam name="NAME">DESCRPITION</typeparam>
.I <typeparam/>
is a top-level element, and should be nested directly under the 
.I <Docs/>
element.
.Sp
This is used to describe type parameter for a generic type or generic method.
.Sp
.I NAME
is the name of the type parameter, while
.I DESCRIPTION
contains a description of the parameter (what it's used for, what restrictions
it must meet, etc.).
.nf
	<typeparam name="T">The type of the underlying collection</typeparam>
.fi
.TP
.I <typeparamref>
Used to indicate that a word is a type parameter, for use within other text
blocks (e.g. within 
.I <para/>
).
.nf
	<para>If <typeparamref name="T" /> is a struct, then...</para>
.fi
.TP
.I <value>DESCRIPTION</value>
.I <value/>
is a top-level element, and should be nested directly under the 
.I <Docs/>
element.
.Sp
Allows a property to be described.
.nf
	<value>
	  A <see cref="T:System.String" /> containing a widget name.
	</value>
.fi
.PP
.SH SEE ALSO
mdassembler(1), mdcs2ecma(1), mdnormalizer(1), mdvalidator(1), monodocs2html(1)
.SH MAILING LISTS
.TP
Visit http://lists.ximian.com/mailman/listinfo/mono-docs-list for details.
.SH WEB SITE
Visit http://www.mono-project.com for details