Skip to content

Commit f5f7ed4

Browse files
committed
Minor code edits; etc.
1 parent f933ed0 commit f5f7ed4

5 files changed

Lines changed: 22 additions & 23 deletions

File tree

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
# ******** NOTE ********
88
# We have attempted to detect the languages in your repository. Please check
9-
# the `language` matrix defined below to confirm you have the correct set of
9+
# the `language` matrix defined next to confirm you have the correct set of
1010
# supported CodeQL languages.
1111
#
1212
name: "CodeQL"

CBOR/PeterO/Cbor/CBORObject.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace PeterO.Cbor {
2525
/// <remarks>
2626
/// <para><b>Converting CBOR objects</b></para>
2727
/// <para>There are many ways to get a CBOR object, including from
28-
/// bytes, objects, streams and JSON, as described below.</para>
28+
/// bytes, objects, streams and JSON, as described later.</para>
2929
/// <para><b>To and from byte arrays:</b> The
3030
/// CBORObject.DecodeFromBytes method converts a byte array in CBOR
3131
/// format to a CBOR object. The EncodeToBytes method converts a CBOR
@@ -2792,8 +2792,8 @@ public static CBORObject FromObject(
27922792
/// <item>Then, the method returns a CBOR map with each eligible
27932793
/// getter's name or property name as each key, and with the
27942794
/// corresponding value returned by that getter as that key's value.
2795-
/// Before adding a key-value pair to the map, the key's name is
2796-
/// adjusted according to the rules described in the <see
2795+
/// Before adding a key-value pair to the map, the key's name adjusts
2796+
/// according to the rules described in the <see
27972797
/// cref='PeterO.Cbor.PODOptions'/> documentation. Note that for
27982798
/// security reasons, certain types are not supported even if they
27992799
/// contain eligible getters.</item>
@@ -5265,7 +5265,7 @@ public CBORObject AtJSONPointer(string pointer, CBORObject defaultValue) {
52655265
/// <summary>Returns a copy of this object after applying the
52665266
/// operations in a JSON patch, in the form of a CBOR object. JSON
52675267
/// patches are specified in RFC 6902 and their format is summarized in
5268-
/// the remarks below.</summary>
5268+
/// the remarks given later.</summary>
52695269
/// <param name='patch'>A JSON patch in the form of a CBOR object; it
52705270
/// has the form summarized in the remarks.</param>
52715271
/// <returns>The result of the patch operation.</returns>

CBOR/PeterO/Cbor/CharacterReader.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public CharacterReader(string str) : this(str, false, false) {
3737
// string.</param>
3838
// <param name='skipByteOrderMark'>If true and the first character in
3939
// the string is U+FEFF, skip that character.</param>
40-
// <exception cref="ArgumentNullException">The parameter <paramref
40+
// <exception cref='ArgumentNullException'>The parameter <paramref
4141
// name='str'/> is null.</exception>
4242
public CharacterReader(string str, bool skipByteOrderMark)
4343
: this(str, skipByteOrderMark, false) {
@@ -52,7 +52,7 @@ public CharacterReader(string str, bool skipByteOrderMark)
5252
// <param name='errorThrow'>When encountering invalid encoding, throw
5353
// an exception if this parameter is true, or replace it with U+FFFD
5454
// (replacement character) if this parameter is false.</param>
55-
// <exception cref="ArgumentNullException">The parameter <paramref
55+
// <exception cref='ArgumentNullException'>The parameter <paramref
5656
// name='str'/> is null.</exception>
5757
public CharacterReader(
5858
string str,
@@ -80,12 +80,12 @@ public CharacterReader(
8080
// <param name='length'>The length, in code units, of the desired
8181
// portion of <paramref name='str'/> (but not more than <paramref
8282
// name='str'/> 's length).</param>
83-
// <exception cref="ArgumentException">Either &#x22;offset&#x22; or
83+
// <exception cref='ArgumentException'>Either &#x22;offset&#x22; or
8484
// &#x22;length&#x22; is less than 0 or greater than
8585
// &#x22;str&#x22;&#x27;s length, or &#x22;str&#x22;&#x27;s length
8686
// minus &#x22;offset&#x22; is less than
8787
// &#x22;length&#x22;.</exception>
88-
// <exception cref="ArgumentNullException">The parameter <paramref
88+
// <exception cref='ArgumentNullException'>The parameter <paramref
8989
// name='str'/> is null.</exception>
9090
public CharacterReader(string str, int offset, int length)
9191
: this(str, offset, length, false, false) {
@@ -105,9 +105,9 @@ public CharacterReader(string str, int offset, int length)
105105
// <param name='errorThrow'>When encountering invalid encoding, throw
106106
// an exception if this parameter is true, or replace it with U+FFFD
107107
// (replacement character) if this parameter is false.</param>
108-
// <exception cref="ArgumentNullException">The parameter <paramref
108+
// <exception cref='ArgumentNullException'>The parameter <paramref
109109
// name='str'/> is null.</exception>
110-
// <exception cref="ArgumentException">Either <paramref
110+
// <exception cref='ArgumentException'>Either <paramref
111111
// name='offset'/> or <paramref name='length'/> is less than 0 or
112112
// greater than <paramref name='str'/> 's length, or <paramref
113113
// name='str'/> 's length minus <paramref name='offset'/> is less than
@@ -157,7 +157,7 @@ public CharacterReader(
157157
// first in the stream, and replace invalid byte sequences with
158158
// replacement characters (U+FFFD).</summary>
159159
// <param name='stream'>A readable data stream.</param>
160-
// <exception cref="ArgumentNullException">The parameter <paramref
160+
// <exception cref='ArgumentNullException'>The parameter <paramref
161161
// name='stream'/> is null.</exception>
162162
public CharacterReader(Stream stream) : this(stream, 0, false) {
163163
}
@@ -208,7 +208,7 @@ public CharacterReader(Stream stream, int mode, bool errorThrow)
208208
// <item>3: Detect UTF-16 using BOM, otherwise UTF-8.</item>
209209
// <item>4: Detect UTF-16/UTF-32 using BOM, otherwise UTF-8. (Tries to
210210
// detect UTF-32 first.)</item></list>.</param>
211-
// <exception cref="ArgumentNullException">The parameter <paramref
211+
// <exception cref='ArgumentNullException'>The parameter <paramref
212212
// name='stream'/> is null.</exception>
213213
public CharacterReader(Stream stream, int mode)
214214
: this(stream, mode, false, false) {
@@ -239,7 +239,7 @@ public CharacterReader(Stream stream, int mode)
239239
// (including when "mode" is 0) and this parameter is <c>true</c>,
240240
// won't skip the BOM character if it occurs at the start of the
241241
// stream.</param>
242-
// <exception cref="ArgumentNullException">The parameter <paramref
242+
// <exception cref='ArgumentNullException'>The parameter <paramref
243243
// name='stream'/> is null.</exception>
244244
public CharacterReader(
245245
Stream stream,
@@ -273,9 +273,9 @@ private interface IByteReader {
273273
// <returns>The number of code points read from the stream. This can
274274
// be less than the <paramref name='length'/> parameter if the end of
275275
// the stream is reached.</returns>
276-
// <exception cref="ArgumentNullException">The parameter <paramref
276+
// <exception cref='ArgumentNullException'>The parameter <paramref
277277
// name='chars'/> is null.</exception>
278-
// <exception cref="ArgumentException">Either <paramref name='index'/>
278+
// <exception cref='ArgumentException'>Either <paramref name='index'/>
279279
// or <paramref name='length'/> is less than 0 or greater than
280280
// <paramref name='chars'/> 's length, or <paramref name='chars'/> 's
281281
// length minus <paramref name='index'/> is less than <paramref

CBOR/docs.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,7 +1799,7 @@
17991799
<remarks>
18001800
<para><b>Converting CBOR objects</b></para>
18011801
<para>There are many ways to get a CBOR object, including from
1802-
bytes, objects, streams and JSON, as described below.</para>
1802+
bytes, objects, streams and JSON, as described later.</para>
18031803
<para><b>To and from byte arrays:</b> The
18041804
CBORObject.DecodeFromBytes method converts a byte array in CBOR
18051805
format to a CBOR object. The EncodeToBytes method converts a CBOR
@@ -1980,7 +1980,7 @@
19801980
<summary>Returns a copy of this object after applying the
19811981
operations in a JSON patch, in the form of a CBOR object. JSON
19821982
patches are specified in RFC 6902 and their format is summarized in
1983-
the remarks below.</summary>
1983+
the remarks given later.</summary>
19841984
<param name='patch'>A JSON patch in the form of a CBOR object; it
19851985
has the form summarized in the remarks.</param>
19861986
<returns>The result of the patch operation.</returns>
@@ -3983,8 +3983,7 @@
39833983
<item>Then, the method returns a CBOR map with each eligible
39843984
getter's name or property name as each key, and with the
39853985
corresponding value returned by that getter as that key's value.
3986-
Before adding a key-value pair to the map, the key's name is
3987-
adjusted according to the rules described in the <see cref='PeterO.Cbor.PODOptions'/> documentation. Note that for
3986+
Before adding a key-value pair to the map, the key's name adjusts according to the rules described in the <see cref='PeterO.Cbor.PODOptions'/> documentation. Note that for
39883987
security reasons, certain types are not supported even if they
39893988
contain eligible getters.</item>
39903989
</list>

docs/PeterO.Cbor.CBORObject.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Represents an object in Concise Binary Object Representation (CBOR) and contains
88

99
<b>Converting CBOR objects</b>
1010

11-
There are many ways to get a CBOR object, including from bytes, objects, streams and JSON, as described below.
11+
There are many ways to get a CBOR object, including from bytes, objects, streams and JSON, as described later.
1212

1313
<b>To and from byte arrays:</b> The CBORObject.DecodeFromBytes method converts a byte array in CBOR format to a CBOR object. The EncodeToBytes method converts a CBOR object to its corresponding byte array in CBOR format.
1414

@@ -630,7 +630,7 @@ This object is not an array.
630630
public PeterO.Cbor.CBORObject ApplyJSONPatch(
631631
PeterO.Cbor.CBORObject patch);
632632

633-
Returns a copy of this object after applying the operations in a JSON patch, in the form of a CBOR object. JSON patches are specified in RFC 6902 and their format is summarized in the remarks below.
633+
Returns a copy of this object after applying the operations in a JSON patch, in the form of a CBOR object. JSON patches are specified in RFC 6902 and their format is summarized in the remarks given later.
634634

635635
<b>Remarks:</b> A JSON patch is an array with one or more maps. Each map has the following keys:
636636

@@ -2527,7 +2527,7 @@ Generates a CBORObject from an arbitrary object, using the specified options to
25272527

25282528
* (*) In the Java version, eligible getters are public, nonstatic methods starting with "get" or "is" (either word followed by a character other than a basic digit or lowercase letter, that is, other than "a" to "z" or "0" to "9"), that take no parameters and do not return void, except that methods named "getClass" are not eligible getters. In addition, public, nonstatic, nonfinal fields are also eligible getters. If a class has two otherwise eligible getters (methods and/or fields) of the form "isX" and "getX", where "X" is the same in both, or two such getters with the same name but different return type, they are not eligible getters.
25292529

2530-
* Then, the method returns a CBOR map with each eligible getter's name or property name as each key, and with the corresponding value returned by that getter as that key's value. Before adding a key-value pair to the map, the key's name is adjusted according to the rules described in the [PeterO.Cbor.PODOptions](PeterO.Cbor.PODOptions.md) documentation. Note that for security reasons, certain types are not supported even if they contain eligible getters.
2530+
* Then, the method returns a CBOR map with each eligible getter's name or property name as each key, and with the corresponding value returned by that getter as that key's value. Before adding a key-value pair to the map, the key's name adjusts according to the rules described in the [PeterO.Cbor.PODOptions](PeterO.Cbor.PODOptions.md) documentation. Note that for security reasons, certain types are not supported even if they contain eligible getters.
25312531

25322532
<b>REMARK:</b> .NET enumeration ( `Enum` ) constants could also have been converted to text strings with `ToString()` , but that method will return multiple names if the specified Enum object is a combination of Enum objects (for example if the object is `FileAccess.Read | FileAccess.Write` ). More generally, if Enums are converted to text strings, constants from Enum types with the `Flags` attribute, and constants from the same Enum type that share an underlying value, should not be passed to this method.
25332533

0 commit comments

Comments
 (0)