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

◆ CheckExpectedTag()

static void System.Formats.Asn1.AsnDecoder.CheckExpectedTag ( Asn1Tag tag,
Asn1Tag expectedTag,
UniversalTagNumber tagNumber )
inlinestaticprivate

Definition at line 372 of file AsnDecoder.cs.

373 {
374 if (expectedTag.TagClass == TagClass.Universal && expectedTag.TagValue != (int)tagNumber)
375 {
377 }
378 if (expectedTag.TagClass != tag.TagClass || expectedTag.TagValue != tag.TagValue)
379 {
380 throw new AsnContentException(System.SR.Format(System.SR.ContentException_WrongTag, tag.TagClass, tag.TagValue, expectedTag.TagClass, expectedTag.TagValue));
381 }
382 }
static string ContentException_WrongTag
Definition SR.cs:76
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string Argument_UniversalValueIsFixed
Definition SR.cs:32
Definition SR.cs:7

References System.SR.Argument_UniversalValueIsFixed, System.SR.ContentException_WrongTag, System.SR.Format(), System.Formats.Asn1.Asn1Tag.TagClass, and System.Formats.Asn1.Asn1Tag.TagValue.

Referenced by System.Formats.Asn1.AsnDecoder.GetPrimitiveContentSpan(), System.Formats.Asn1.AsnDecoder.ReadNamedBitList(), System.Formats.Asn1.AsnDecoder.ReadSequence(), System.Formats.Asn1.AsnDecoder.ReadSetOf(), System.Formats.Asn1.AsnDecoder.TryReadPrimitiveBitStringCore(), and System.Formats.Asn1.AsnDecoder.TryReadPrimitiveOctetStringCore().