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

◆ Slice() [2/3]

static ReadOnlySpan< byte > System.Formats.Asn1.AsnDecoder.Slice ( ReadOnlySpan< byte > source,
int offset,
int length )
inlinestaticprivate

Definition at line 328 of file AsnDecoder.cs.

329 {
330 if (length < 0 || source.Length - offset < length)
331 {
332 throw new AsnContentException(System.SR.ContentException_LengthExceedsPayload);
333 }
334 return source.Slice(offset, length);
335 }
static string ContentException_LengthExceedsPayload
Definition SR.cs:62
Definition SR.cs:7

References System.SR.ContentException_LengthExceedsPayload, System.length, System.offset, and System.source.

Referenced by System.Formats.Asn1.AsnDecoder.CopyConstructedOctetString(), System.Formats.Asn1.AsnDecoder.GetOctetStringContents(), System.Formats.Asn1.AsnDecoder.GetPrimitiveContentSpan(), System.Formats.Asn1.AsnDecoder.ParseNonNegativeIntAndSlice(), System.Formats.Asn1.AsnDecoder.ProcessConstructedBitString(), System.Formats.Asn1.AsnDecoder.ReadBitString(), System.Formats.Asn1.AsnReader.ReadEnumeratedBytes(), System.Formats.Asn1.AsnReader.ReadIntegerBytes(), System.Formats.Asn1.AsnDecoder.ReadSetOf(), System.Formats.Asn1.AsnDecoder.SeekEndOfContents(), System.Formats.Asn1.AsnDecoder.TryReadBitString(), System.Formats.Asn1.AsnDecoder.TryReadCharacterStringBytesCore(), System.Formats.Asn1.AsnDecoder.TryReadOctetString(), System.Formats.Asn1.AsnReader.TryReadPrimitiveBitString(), System.Formats.Asn1.AsnDecoder.TryReadPrimitiveBitStringCore(), System.Formats.Asn1.AsnReader.TryReadPrimitiveCharacterStringBytes(), System.Formats.Asn1.AsnReader.TryReadPrimitiveOctetString(), and System.Formats.Asn1.AsnDecoder.TryReadPrimitiveOctetStringCore().