Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ReadSetOf()

static void System.Formats.Asn1.AsnDecoder.ReadSetOf ( ReadOnlySpan< byte > source,
AsnEncodingRules ruleSet,
out int contentOffset,
out int contentLength,
out int bytesConsumed,
bool skipSortOrderValidation = false,
Asn1Tag? expectedTag = null )
inlinestatic

Definition at line 1573 of file AsnDecoder.cs.

1574 {
1575 int? contentsLength;
1576 int bytesRead;
1578 CheckExpectedTag(tag, expectedTag ?? Asn1Tag.SetOf, UniversalTagNumber.Set);
1579 if (!tag.IsConstructed)
1580 {
1582 }
1583 int num;
1585 if (contentsLength.HasValue)
1586 {
1587 num = 0;
1589 }
1590 else
1591 {
1594 num = 2;
1595 }
1597 {
1600 while (!source2.IsEmpty)
1601 {
1605 if (SetOfValueComparer.Compare(readOnlySpan2, y) < 0)
1606 {
1607 throw new AsnContentException(System.SR.ContentException_SetOfNotSorted);
1608 }
1609 y = readOnlySpan2;
1610 }
1611 }
1613 contentLength = readOnlySpan.Length;
1614 bytesConsumed = bytesRead + readOnlySpan.Length + num;
1615 }
static int SeekEndOfContents(ReadOnlySpan< byte > source, AsnEncodingRules ruleSet)
static ReadOnlySpan< byte > Slice(ReadOnlySpan< byte > source, int offset, int length)
static void CheckExpectedTag(Asn1Tag tag, Asn1Tag expectedTag, UniversalTagNumber tagNumber)
static Asn1Tag ReadEncodedValue(ReadOnlySpan< byte > source, AsnEncodingRules ruleSet, out int contentOffset, out int contentLength, out int bytesConsumed)
Definition AsnDecoder.cs:57
static Asn1Tag ReadTagAndLength(ReadOnlySpan< byte > source, AsnEncodingRules ruleSet, out int? contentsLength, out int bytesRead)
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string ContentException_ConstructedEncodingRequired
Definition SR.cs:48
static string ContentException_SetOfNotSorted
Definition SR.cs:72
Definition SR.cs:7

References System.Formats.Asn1.AsnDecoder.CheckExpectedTag(), System.Formats.Asn1.SetOfValueComparer.Compare(), System.SR.ContentException_ConstructedEncodingRequired, System.SR.ContentException_SetOfNotSorted, System.SR.Format(), System.Formats.Asn1.Asn1Tag.IsConstructed, System.length, System.Formats.Asn1.AsnDecoder.ReadEncodedValue(), System.Formats.Asn1.AsnDecoder.ReadTagAndLength(), System.Formats.Asn1.AsnDecoder.SeekEndOfContents(), System.Formats.Asn1.Asn1Tag.SetOf, System.Formats.Asn1.AsnDecoder.Slice(), and System.source.

Referenced by System.Formats.Asn1.AsnValueReader.ReadSetOf(), and System.Formats.Asn1.AsnReader.ReadSetOf().