-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
16 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2336,7 +2336,8 @@ public static CBORObject FromInt32(int value) { | |
/// <param name='value'>The parameter <paramref name='value'/> is a | ||
/// Guid.</param> | ||
/// <returns>A CBOR object.</returns> | ||
public static CBORObject FromGuid(Guid value) => new CBORUuidConverter().ToCBORObject(value); | ||
public static CBORObject FromGuid(Guid value) => new | ||
CBORUuidConverter().ToCBORObject(value); | ||
|
||
/// <summary>Generates a CBOR object from a 32-bit signed | ||
/// integer.</summary> | ||
|
@@ -3240,7 +3241,8 @@ public static CBORObject NewMap() { | |
/// undefined order.</summary> | ||
/// <param name='keysAndValues'>A sequence of key-value pairs.</param> | ||
/// <returns>A new CBOR map.</returns> | ||
public static CBORObject FromMap(IEnumerable<Tuple<CBORObject, CBORObject>> keysAndValues) { | ||
public static CBORObject FromMap(IEnumerable<Tuple<CBORObject, | ||
CBORObject >> keysAndValues) { | ||
Check warning on line 3245 in CBOR/PeterO/Cbor/CBORObject.cs GitHub Actions / Core (ubuntu-latest)
Check warning on line 3245 in CBOR/PeterO/Cbor/CBORObject.cs GitHub Actions / Core (macos-latest)
|
||
var sd = new SortedDictionary<CBORObject, CBORObject>(); | ||
foreach (Tuple<CBORObject, CBORObject> kv in keysAndValues) { | ||
sd.Add(kv.Item1, kv.Item2); | ||
|
@@ -3259,11 +3261,12 @@ public static CBORObject NewOrderedMap() { | |
PropertyMap.NewOrderedDict()); | ||
} | ||
|
||
/// <summary>Creates a new CBOR map that ensures that keys are | ||
/// stored in order.</summary> | ||
/// <summary>Creates a new CBOR map that ensures that keys are stored | ||
/// in order.</summary> | ||
/// <param name='keysAndValues'>A sequence of key-value pairs.</param> | ||
/// <returns>A new CBOR map.</returns> | ||
public static CBORObject FromOrderedMap(IEnumerable<Tuple<CBORObject, CBORObject>> keysAndValues) { | ||
public static CBORObject FromOrderedMap(IEnumerable<Tuple<CBORObject, | ||
CBORObject >> keysAndValues) { | ||
Check warning on line 3269 in CBOR/PeterO/Cbor/CBORObject.cs GitHub Actions / Core (ubuntu-latest)
Check warning on line 3269 in CBOR/PeterO/Cbor/CBORObject.cs GitHub Actions / Core (macos-latest)
|
||
var oDict = PropertyMap.NewOrderedDict(); | ||
foreach (Tuple<CBORObject, CBORObject> kv in keysAndValues) { | ||
oDict.Add(kv.Item1, kv.Item2); | ||
|
@@ -4697,9 +4700,10 @@ public float AsSingle() { | |
|
||
/// <summary>Converts this object to a Guid.</summary> | ||
/// <returns>A Guid.</returns> | ||
/// <exception cref="InvalidOperationException">This object does | ||
/// not represent a Guid.</exception><exception cref="CBORException"> | ||
/// This object does not have the expected tag.</exception> | ||
/// <exception cref='InvalidOperationException'>This object does not | ||
/// represent a Guid.</exception> | ||
/// <exception cref='CBORException'>This object does not have the | ||
/// expected tag.</exception> | ||
public Guid AsGuid() { | ||
return new CBORUuidConverter().FromCBORObject(this); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters