Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ParserHelpers.cs
Go to the documentation of this file.
1
using
System.Diagnostics
;
2
using
System.Diagnostics.CodeAnalysis
;
3
using
System.Runtime.CompilerServices
;
4
using
Internal.Runtime.CompilerServices
;
5
6
namespace
System.Buffers.Text
;
7
8
internal
static
class
ParserHelpers
9
{
10
[MethodImpl(
MethodImplOptions
.AggressiveInlining)]
11
public
static
bool
IsDigit
(
int
i)
12
{
13
return
(uint)(i - 48) <= 9u;
14
}
15
16
public
static
bool
TryParseThrowFormatException
(out
int
bytesConsumed)
17
{
18
bytesConsumed = 0;
19
ThrowHelper
.
ThrowFormatException_BadFormatSpecifier
();
20
return
false
;
21
}
22
23
public
static
bool
TryParseThrowFormatException<T>
(out T
value
, out
int
bytesConsumed) where
T
:
struct
24
{
25
value
=
default
(T);
26
return
TryParseThrowFormatException
(out bytesConsumed);
27
}
28
29
[DoesNotReturn]
30
[StackTraceHidden]
31
public
static
bool
TryParseThrowFormatException<T>
(
ReadOnlySpan<byte>
source
, out T
value
, out
int
bytesConsumed) where
T
:
struct
32
{
33
Unsafe
.SkipInit<T>(out
value
);
34
Unsafe
.SkipInit<
int
>(out bytesConsumed);
35
ThrowHelper
.
ThrowFormatException_BadFormatSpecifier
();
36
return
false
;
37
}
38
}
Internal.Runtime.CompilerServices.Unsafe
Definition
Unsafe.cs:10
System.Buffers.Text.ParserHelpers.TryParseThrowFormatException
static bool TryParseThrowFormatException(out int bytesConsumed)
Definition
ParserHelpers.cs:16
System.Buffers.Text.ParserHelpers.TryParseThrowFormatException< T >
static bool TryParseThrowFormatException< T >(out T value, out int bytesConsumed)
Definition
ParserHelpers.cs:23
System.Buffers.Text.ParserHelpers.IsDigit
static bool IsDigit(int i)
Definition
ParserHelpers.cs:11
System.Buffers.Text.ParserHelpers
Definition
ParserHelpers.cs:9
System.ThrowHelper.ThrowFormatException_BadFormatSpecifier
static void ThrowFormatException_BadFormatSpecifier()
Definition
ThrowHelper.cs:396
System.ThrowHelper
Definition
ThrowHelper.cs:6
Internal.Runtime.CompilerServices
Definition
Unsafe.cs:6
System.Buffers.Text
Definition
Base64.cs:7
System.Diagnostics.CodeAnalysis
Definition
AllowNullAttribute.cs:1
System.Diagnostics
Definition
AggregationManager.cs:6
System.Runtime.CompilerServices.MethodImplOptions
MethodImplOptions
Definition
MethodImplOptions.cs:5
System.Runtime.CompilerServices
Definition
NullablePublicOnlyAttribute.cs:3
System.ExceptionArgument.value
@ value
System.ExceptionArgument.source
@ source
System.ConsoleKey.T
@ T
System.ReadOnlySpan
Definition
ReadOnlySpan.cs:14
source
System.Private.CoreLib
System.Buffers.Text
ParserHelpers.cs
Generated by
1.10.0