Skip to content

Commit cfba112

Browse files
committed
Improved API docs
1 parent 8ef5392 commit cfba112

File tree

9 files changed

+121
-121
lines changed

9 files changed

+121
-121
lines changed

HtmlKit/HtmlAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public HtmlAttribute (HtmlAttributeId id, string value)
6767
/// <param name="name">The attribute name.</param>
6868
/// <param name="value">The attribute value.</param>
6969
/// <exception cref="System.ArgumentNullException">
70-
/// <paramref name="name"/> is <c>null</c>.
70+
/// <paramref name="name"/> is <see langword="null"/>.
7171
/// </exception>
7272
public HtmlAttribute (string name, string value)
7373
{

HtmlKit/HtmlAttributeCollection.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ internal void Add (HtmlAttribute attribute)
9090
/// Checks if an attribute exists.
9191
/// </remarks>
9292
/// <param name="id">The attribute.</param>
93-
/// <returns><c>true</c> if the attribute exists within the collection; otherwise, <c>false</c>.</returns>
93+
/// <returns><see langword="true" /> if the attribute exists within the collection; otherwise, <see langword="false" />.</returns>
9494
public bool Contains (HtmlAttributeId id)
9595
{
9696
return IndexOf (id) != -1;
@@ -103,9 +103,9 @@ public bool Contains (HtmlAttributeId id)
103103
/// Checks if an attribute exists.
104104
/// </remarks>
105105
/// <param name="name">The name of the attribute.</param>
106-
/// <returns><c>true</c> if the attribute exists within the collection; otherwise, <c>false</c>.</returns>
106+
/// <returns><see langword="true" /> if the attribute exists within the collection; otherwise, <see langword="false" />.</returns>
107107
/// <exception cref="ArgumentNullException">
108-
/// <paramref name="name"/> is <c>null</c>.
108+
/// <paramref name="name"/> is <see langword="null"/>.
109109
/// </exception>
110110
public bool Contains (string name)
111111
{
@@ -119,7 +119,7 @@ public bool Contains (string name)
119119
/// Gets the index of a desired attribute.
120120
/// </remarks>
121121
/// <param name="id">The attribute.</param>
122-
/// <returns><c>true</c> if the attribute exists within the collection; otherwise, <c>false</c>.</returns>
122+
/// <returns><see langword="true" /> if the attribute exists within the collection; otherwise, <see langword="false" />.</returns>
123123
public int IndexOf (HtmlAttributeId id)
124124
{
125125
for (int i = 0; i < attributes.Count; i++) {
@@ -137,9 +137,9 @@ public int IndexOf (HtmlAttributeId id)
137137
/// Gets the index of a desired attribute.
138138
/// </remarks>
139139
/// <param name="name">The name of the attribute.</param>
140-
/// <returns><c>true</c> if the attribute exists within the collection; otherwise, <c>false</c>.</returns>
140+
/// <returns><see langword="true" /> if the attribute exists within the collection; otherwise, <see langword="false" />.</returns>
141141
/// <exception cref="ArgumentNullException">
142-
/// <paramref name="name"/> is <c>null</c>.
142+
/// <paramref name="name"/> is <see langword="null"/>.
143143
/// </exception>
144144
public int IndexOf (string name)
145145
{
@@ -176,8 +176,8 @@ public HtmlAttribute this[int index] {
176176
/// Gets an attribute from the collection if it exists.
177177
/// </remarks>
178178
/// <param name="id">The id of the attribute.</param>
179-
/// <param name="attribute">The attribute if found; otherwise, <c>null</c>.</param>
180-
/// <returns><c>true</c> if the desired attribute is found; otherwise, <c>false</c>.</returns>
179+
/// <param name="attribute">The attribute if found; otherwise, <see langword="null"/>.</param>
180+
/// <returns><see langword="true" /> if the desired attribute is found; otherwise, <see langword="false" />.</returns>
181181
public bool TryGetValue (HtmlAttributeId id, out HtmlAttribute attribute)
182182
{
183183
int index;
@@ -199,10 +199,10 @@ public bool TryGetValue (HtmlAttributeId id, out HtmlAttribute attribute)
199199
/// Gets an attribute from the collection if it exists.
200200
/// </remarks>
201201
/// <param name="name">The name of the attribute.</param>
202-
/// <param name="attribute">The attribute if found; otherwise, <c>null</c>.</param>
203-
/// <returns><c>true</c> if the desired attribute is found; otherwise, <c>false</c>.</returns>
202+
/// <param name="attribute">The attribute if found; otherwise, <see langword="null"/>.</param>
203+
/// <returns><see langword="true" /> if the desired attribute is found; otherwise, <see langword="false" />.</returns>
204204
/// <exception cref="ArgumentNullException">
205-
/// <paramref name="name"/> is <c>null</c>.
205+
/// <paramref name="name"/> is <see langword="null"/>.
206206
/// </exception>
207207
public bool TryGetValue (string name, out HtmlAttribute attribute)
208208
{

HtmlKit/HtmlAttributeId.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ static HtmlAttributeIdExtensions ()
702702
for (int i = 1; i < values.Length; i++) {
703703
var value = (HtmlAttributeId) values.GetValue (i);
704704

705-
IdMapping.Add (value.ToAttributeName (), value);
705+
IdMapping.Add (AttributeNames[i - 1], value);
706706
}
707707
}
708708

HtmlKit/HtmlEntityDecoder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ bool PushNumericEntity (char c)
116116
/// <para>Pushes the specified character into the HTML entity decoder.</para>
117117
/// <para>The first character pushed MUST be the '&amp;' character.</para>
118118
/// </remarks>
119-
/// <returns><c>true</c> if the character was accepted; otherwise, <c>false</c>.</returns>
119+
/// <returns><see langword="true" /> if the character was accepted; otherwise, <see langword="false" />.</returns>
120120
/// <param name="c">The character.</param>
121121
/// <exception cref="System.ArgumentOutOfRangeException">
122122
/// <paramref name="c"/> is the first character being pushed and was not the '&amp;' character.

HtmlKit/HtmlTagId.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,7 @@ static HtmlTagIdExtensions ()
870870
for (int i = 1; i < values.Length; i++) {
871871
var value = (HtmlTagId) values.GetValue (i);
872872

873-
IdMapping.Add (value.ToHtmlTagName (), value);
873+
IdMapping.Add (TagNames[i - 1], value);
874874
}
875875
}
876876

@@ -915,12 +915,12 @@ internal static HtmlTagId ToHtmlTagId (this string name)
915915
}
916916

917917
/// <summary>
918-
/// Determines whether or not the HTML tag is an empty element.
918+
/// Determines whether the HTML tag is an empty element.
919919
/// </summary>
920920
/// <remarks>
921-
/// Determines whether or not the HTML tag is an empty element.
921+
/// Determines whether the HTML tag is an empty element.
922922
/// </remarks>
923-
/// <returns><c>true</c> if the tag is an empty element; otherwise, <c>false</c>.</returns>
923+
/// <returns><see langword="true" /> if the tag is an empty element; otherwise, <see langword="false" />.</returns>
924924
/// <param name="id">Identifier.</param>
925925
public static bool IsEmptyElement (this HtmlTagId id)
926926
{
@@ -948,12 +948,12 @@ public static bool IsEmptyElement (this HtmlTagId id)
948948
}
949949

950950
/// <summary>
951-
/// Determines whether or not the HTML tag is a formatting element.
951+
/// Determines whether the HTML tag is a formatting element.
952952
/// </summary>
953953
/// <remarks>
954-
/// Determines whether or not the HTML tag is a formatting element.
954+
/// Determines whether the HTML tag is a formatting element.
955955
/// </remarks>
956-
/// <returns><c>true</c> if the HTML tag is a formatting element; otherwise, <c>false</c>.</returns>
956+
/// <returns><see langword="true" /> if the HTML tag is a formatting element; otherwise, <see langword="false" />.</returns>
957957
/// <param name="id">The HTML tag identifier.</param>
958958
public static bool IsFormattingElement (this HtmlTagId id)
959959
{

HtmlKit/HtmlToken.cs

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public HtmlTokenKind Kind {
6868
/// </remarks>
6969
/// <param name="output">The output.</param>
7070
/// <exception cref="System.ArgumentNullException">
71-
/// <paramref name="output"/> is <c>null</c>.
71+
/// <paramref name="output"/> is <see langword="null"/>.
7272
/// </exception>
7373
public abstract void WriteTo (TextWriter output);
7474

@@ -104,9 +104,9 @@ public class HtmlCommentToken : HtmlToken
104104
/// Creates a new <see cref="HtmlCommentToken"/>.
105105
/// </remarks>
106106
/// <param name="comment">The comment text.</param>
107-
/// <param name="bogus"><c>true</c> if the comment is bogus; otherwise, <c>false</c>.</param>
107+
/// <param name="bogus"><see langword="true" /> if the comment is bogus; otherwise, <see langword="false" />.</param>
108108
/// <exception cref="System.ArgumentNullException">
109-
/// <paramref name="comment"/> is <c>null</c>.
109+
/// <paramref name="comment"/> is <see langword="null"/>.
110110
/// </exception>
111111
public HtmlCommentToken (string comment, bool bogus = false) : base (HtmlTokenKind.Comment)
112112
{
@@ -129,12 +129,12 @@ public string Comment {
129129
}
130130

131131
/// <summary>
132-
/// Get whether or not the comment is a bogus comment.
132+
/// Get whether the comment is a bogus comment.
133133
/// </summary>
134134
/// <remarks>
135-
/// Gets whether or not the comment is a bogus comment.
135+
/// Gets whether the comment is a bogus comment.
136136
/// </remarks>
137-
/// <value><c>true</c> if the comment is bogus; otherwise, <c>false</c>.</value>
137+
/// <value><see langword="true" /> if the comment is bogus; otherwise, <see langword="false" />.</value>
138138
public bool IsBogusComment {
139139
get; private set;
140140
}
@@ -151,7 +151,7 @@ internal bool IsBangComment {
151151
/// </remarks>
152152
/// <param name="output">The output.</param>
153153
/// <exception cref="System.ArgumentNullException">
154-
/// <paramref name="output"/> is <c>null</c>.
154+
/// <paramref name="output"/> is <see langword="null"/>.
155155
/// </exception>
156156
public override void WriteTo (TextWriter output)
157157
{
@@ -192,7 +192,7 @@ public class HtmlDataToken : HtmlToken
192192
/// <paramref name="kind"/> is not a valid <see cref="HtmlTokenKind"/>.
193193
/// </exception>
194194
/// <exception cref="System.ArgumentNullException">
195-
/// <paramref name="data"/> is <c>null</c>.
195+
/// <paramref name="data"/> is <see langword="null"/>.
196196
/// </exception>
197197
protected HtmlDataToken (HtmlTokenKind kind, string data) : base (kind)
198198
{
@@ -218,7 +218,7 @@ protected HtmlDataToken (HtmlTokenKind kind, string data) : base (kind)
218218
/// </remarks>
219219
/// <param name="data">The character data.</param>
220220
/// <exception cref="System.ArgumentNullException">
221-
/// <paramref name="data"/> is <c>null</c>.
221+
/// <paramref name="data"/> is <see langword="null"/>.
222222
/// </exception>
223223
public HtmlDataToken (string data) : base (HtmlTokenKind.Data)
224224
{
@@ -252,7 +252,7 @@ public string Data {
252252
/// </remarks>
253253
/// <param name="output">The output.</param>
254254
/// <exception cref="System.ArgumentNullException">
255-
/// <paramref name="output"/> is <c>null</c>.
255+
/// <paramref name="output"/> is <see langword="null"/>.
256256
/// </exception>
257257
public override void WriteTo (TextWriter output)
258258
{
@@ -269,7 +269,7 @@ public override void WriteTo (TextWriter output)
269269
}
270270

271271
/// <summary>
272-
/// An HTML token constisting of <c>[CDATA[</c>.
272+
/// An HTML token consisting of <c>[CDATA[</c>.
273273
/// </summary>
274274
/// <remarks>
275275
/// An HTML token consisting of <c>[CDATA[</c>.
@@ -284,7 +284,7 @@ public class HtmlCDataToken : HtmlDataToken
284284
/// </remarks>
285285
/// <param name="data">The character data.</param>
286286
/// <exception cref="System.ArgumentNullException">
287-
/// <paramref name="data"/> is <c>null</c>.
287+
/// <paramref name="data"/> is <see langword="null"/>.
288288
/// </exception>
289289
public HtmlCDataToken (string data) : base (HtmlTokenKind.CData, data)
290290
{
@@ -299,7 +299,7 @@ public HtmlCDataToken (string data) : base (HtmlTokenKind.CData, data)
299299
/// </remarks>
300300
/// <param name="output">The output.</param>
301301
/// <exception cref="System.ArgumentNullException">
302-
/// <paramref name="output"/> is <c>null</c>.
302+
/// <paramref name="output"/> is <see langword="null"/>.
303303
/// </exception>
304304
public override void WriteTo (TextWriter output)
305305
{
@@ -328,7 +328,7 @@ public class HtmlScriptDataToken : HtmlDataToken
328328
/// </remarks>
329329
/// <param name="data">The script data.</param>
330330
/// <exception cref="System.ArgumentNullException">
331-
/// <paramref name="data"/> is <c>null</c>.
331+
/// <paramref name="data"/> is <see langword="null"/>.
332332
/// </exception>
333333
public HtmlScriptDataToken (string data) : base (HtmlTokenKind.ScriptData, data)
334334
{
@@ -343,7 +343,7 @@ public HtmlScriptDataToken (string data) : base (HtmlTokenKind.ScriptData, data)
343343
/// </remarks>
344344
/// <param name="output">The output.</param>
345345
/// <exception cref="System.ArgumentNullException">
346-
/// <paramref name="output"/> is <c>null</c>.
346+
/// <paramref name="output"/> is <see langword="null"/>.
347347
/// </exception>
348348
public override void WriteTo (TextWriter output)
349349
{
@@ -372,11 +372,11 @@ public class HtmlTagToken : HtmlToken
372372
/// </remarks>
373373
/// <param name="name">The name of the tag.</param>
374374
/// <param name="attributes">The attributes.</param>
375-
/// <param name="isEmptyElement"><c>true</c> if the tag is an empty element; otherwise, <c>false</c>.</param>
375+
/// <param name="isEmptyElement"><see langword="true" /> if the tag is an empty element; otherwise, <see langword="false" />.</param>
376376
/// <exception cref="System.ArgumentNullException">
377-
/// <para><paramref name="name"/> is <c>null</c>.</para>
377+
/// <para><paramref name="name"/> is <see langword="null"/>.</para>
378378
/// <para>-or-</para>
379-
/// <para><paramref name="attributes"/> is <c>null</c>.</para>
379+
/// <para><paramref name="attributes"/> is <see langword="null"/>.</para>
380380
/// </exception>
381381
public HtmlTagToken (string name, IEnumerable<HtmlAttribute> attributes, bool isEmptyElement) : base (HtmlTokenKind.Tag)
382382
{
@@ -398,9 +398,9 @@ public HtmlTagToken (string name, IEnumerable<HtmlAttribute> attributes, bool is
398398
/// Creates a new <see cref="HtmlTagToken"/>.
399399
/// </remarks>
400400
/// <param name="name">The name of the tag.</param>
401-
/// <param name="isEndTag"><c>true</c> if the tag is an end tag; otherwise, <c>false</c>.</param>
401+
/// <param name="isEndTag"><see langword="true" /> if the tag is an end tag; otherwise, <see langword="false" />.</param>
402402
/// <exception cref="System.ArgumentNullException">
403-
/// <paramref name="name"/> is <c>null</c>.
403+
/// <paramref name="name"/> is <see langword="null"/>.
404404
/// </exception>
405405
public HtmlTagToken (string name, bool isEndTag) : base (HtmlTokenKind.Tag)
406406
{
@@ -440,23 +440,23 @@ public HtmlTagId Id {
440440
}
441441

442442
/// <summary>
443-
/// Get whether or not the tag is an empty element.
443+
/// Get whether the tag is an empty element.
444444
/// </summary>
445445
/// <remarks>
446-
/// Gets whether or not the tag is an empty element.
446+
/// Gets whether the tag is an empty element.
447447
/// </remarks>
448-
/// <value><c>true</c> if the tag is an empty element; otherwise, <c>false</c>.</value>
448+
/// <value><see langword="true" /> if the tag is an empty element; otherwise, <see langword="false" />.</value>
449449
public bool IsEmptyElement {
450450
get; internal set;
451451
}
452452

453453
/// <summary>
454-
/// Get whether or not the tag is an end tag.
454+
/// Get whether the tag is an end tag.
455455
/// </summary>
456456
/// <remarks>
457-
/// Gets whether or not the tag is an end tag.
457+
/// Gets whether the tag is an end tag.
458458
/// </remarks>
459-
/// <value><c>true</c> if the tag is an end tag; otherwise, <c>false</c>.</value>
459+
/// <value><see langword="true" /> if the tag is an end tag; otherwise, <see langword="false" />.</value>
460460
public bool IsEndTag {
461461
get; private set;
462462
}
@@ -480,7 +480,7 @@ public string Name {
480480
/// </remarks>
481481
/// <param name="output">The output.</param>
482482
/// <exception cref="System.ArgumentNullException">
483-
/// <paramref name="output"/> is <c>null</c>.
483+
/// <paramref name="output"/> is <see langword="null"/>.
484484
/// </exception>
485485
public override void WriteTo (TextWriter output)
486486
{
@@ -532,12 +532,12 @@ internal string RawTagName {
532532
}
533533

534534
/// <summary>
535-
/// Get whether or not quirks-mode should be forced.
535+
/// Get whether quirks-mode should be forced.
536536
/// </summary>
537537
/// <remarks>
538-
/// Gets whether or not quirks-mode should be forced.
538+
/// Gets whether quirks-mode should be forced.
539539
/// </remarks>
540-
/// <value><c>true</c> if quirks-mode should be forced; otherwise, <c>false</c>.</value>
540+
/// <value><see langword="true" /> if quirks-mode should be forced; otherwise, <see langword="false" />.</value>
541541
public bool ForceQuirksMode {
542542
get; set;
543543
}
@@ -580,7 +580,7 @@ public string PublicIdentifier {
580580
/// <remarks>
581581
/// Gets the public keyword that was used.
582582
/// </remarks>
583-
/// <value>The public keyword or <c>null</c> if it wasn't used.</value>
583+
/// <value>The public keyword or <see langword="null"/> if it wasn't used.</value>
584584
public string PublicKeyword {
585585
get; internal set;
586586
}
@@ -611,7 +611,7 @@ public string SystemIdentifier {
611611
/// <remarks>
612612
/// Gets the system keyword that was used.
613613
/// </remarks>
614-
/// <value>The system keyword or <c>null</c> if it wasn't used.</value>
614+
/// <value>The system keyword or <see langword="null"/> if it wasn't used.</value>
615615
public string SystemKeyword {
616616
get; internal set;
617617
}
@@ -624,7 +624,7 @@ public string SystemKeyword {
624624
/// </remarks>
625625
/// <param name="output">The output.</param>
626626
/// <exception cref="System.ArgumentNullException">
627-
/// <paramref name="output"/> is <c>null</c>.
627+
/// <paramref name="output"/> is <see langword="null"/>.
628628
/// </exception>
629629
public override void WriteTo (TextWriter output)
630630
{

0 commit comments

Comments
 (0)