Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
ThrowHelper.cs
Go to the documentation of this file.
3
5
6internal static class ThrowHelper
7{
8 public enum ExceptionArgument
9 {
14 }
15
16 [MethodImpl(MethodImplOptions.AggressiveInlining)]
17 public static void ValidateTransformBlock(byte[] inputBuffer, int inputOffset, int inputCount)
18 {
19 if (inputBuffer == null)
20 {
22 }
23 if ((uint)inputCount > inputBuffer.Length)
24 {
26 }
27 if (inputOffset < 0)
28 {
30 }
31 if (inputBuffer.Length - inputCount < inputOffset)
32 {
34 }
35 }
36
37 [DoesNotReturn]
38 public static void ThrowArgumentNull(ExceptionArgument argument)
39 {
40 throw new ArgumentNullException(argument.ToString());
41 }
42
43 [DoesNotReturn]
44 public static void ThrowArgumentOutOfRange(ExceptionArgument argument)
45 {
47 }
48
49 [DoesNotReturn]
50 public static void ThrowInvalidOffLen()
51 {
53 }
54
55 [DoesNotReturn]
56 public static void ThrowObjectDisposed()
57 {
59 }
60
61 [DoesNotReturn]
62 public static void ThrowBase64FormatException()
63 {
64 throw new FormatException();
65 }
66}
static string ObjectDisposed_Generic
Definition SR.cs:1742
static string Argument_InvalidOffLen
Definition SR.cs:22
static string ArgumentOutOfRange_NeedNonNegNum
Definition SR.cs:32
Definition SR.cs:7
static void ThrowArgumentOutOfRange(ExceptionArgument argument)
static void ValidateTransformBlock(byte[] inputBuffer, int inputOffset, int inputCount)
static void ThrowArgumentNull(ExceptionArgument argument)