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

◆ ParseSubIdentifier()

static BigInteger System.Formats.Asn1.AsnWriter.ParseSubIdentifier ( ref ReadOnlySpan< char > oidValue)
inlinestaticprivate

Definition at line 1012 of file AsnWriter.cs.

1013 {
1014 int num = oidValue.IndexOf('.');
1015 if (num == -1)
1016 {
1017 num = oidValue.Length;
1018 }
1019 else if (num == 0 || num == oidValue.Length - 1)
1020 {
1021 throw new ArgumentException(System.SR.Argument_InvalidOidValue, "oidValue");
1022 }
1024 for (int i = 0; i < num; i++)
1025 {
1026 if (i > 0 && zero == 0L)
1027 {
1028 throw new ArgumentException(System.SR.Argument_InvalidOidValue, "oidValue");
1029 }
1030 zero *= (BigInteger)10;
1031 zero += (BigInteger)AtoI(oidValue[i]);
1032 }
1033 oidValue = oidValue.Slice(Math.Min(oidValue.Length, num + 1));
1034 return zero;
1035 }
static int AtoI(char c)
static string Argument_InvalidOidValue
Definition SR.cs:20
Definition SR.cs:7
static BigInteger Zero
Definition BigInteger.cs:32

References System.SR.Argument_InvalidOidValue, System.Formats.Asn1.AsnWriter.AtoI(), System.L, System.Math.Min(), and System.Numerics.BigInteger.Zero.

Referenced by System.Formats.Asn1.AsnWriter.WriteObjectIdentifierCore().