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

◆ GetPrimitiveContentSpan()

static ReadOnlySpan< byte > System.Formats.Asn1.AsnDecoder.GetPrimitiveContentSpan ( ReadOnlySpan< byte > source,
AsnEncodingRules ruleSet,
Asn1Tag expectedTag,
UniversalTagNumber tagNumber,
out int bytesConsumed )
inlinestaticprivate

Definition at line 78 of file AsnDecoder.cs.

79 {
82 Asn1Tag tag = Asn1Tag.Decode(source, out bytesConsumed2);
87 if (tag.IsConstructed)
88 {
90 }
91 if (!num.HasValue)
92 {
93 throw new AsnContentException();
94 }
95 ReadOnlySpan<byte> result = Slice(source, num2, num.Value);
96 bytesConsumed = num2 + result.Length;
97 return result;
98 }
static ? int ReadLength(ReadOnlySpan< byte > source, AsnEncodingRules ruleSet, out int bytesConsumed)
static ReadOnlySpan< byte > Slice(ReadOnlySpan< byte > source, int offset, int length)
static void CheckEncodingRules(AsnEncodingRules ruleSet)
static void CheckExpectedTag(Asn1Tag tag, Asn1Tag expectedTag, UniversalTagNumber tagNumber)
static string ContentException_PrimitiveEncodingRequired
Definition SR.cs:70
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
Definition SR.cs:7

References System.Formats.Asn1.AsnDecoder.CheckEncodingRules(), System.Formats.Asn1.AsnDecoder.CheckExpectedTag(), System.SR.ContentException_PrimitiveEncodingRequired, System.Formats.Asn1.Asn1Tag.Decode(), System.SR.Format(), System.Formats.Asn1.Asn1Tag.IsConstructed, System.Formats.Asn1.AsnDecoder.ReadLength(), System.Formats.Asn1.AsnDecoder.Slice(), and System.source.

Referenced by System.Formats.Asn1.AsnDecoder.GetIntegerContents(), System.Formats.Asn1.AsnDecoder.ReadBoolean(), System.Formats.Asn1.AsnDecoder.ReadNull(), and System.Formats.Asn1.AsnDecoder.ReadObjectIdentifier().