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

◆ GetChars() [4/6]

override int System.Text.BinHexEncoding.GetChars ( byte[] bytes,
int byteIndex,
int byteCount,
char[] chars,
int charIndex )
inline

Definition at line 84 of file BinHexEncoding.cs.

85 {
86 if (bytes == null)
87 {
88 throw new ArgumentNullException("bytes");
89 }
90 if (byteIndex < 0)
91 {
92 throw new ArgumentOutOfRangeException("byteIndex", System.SR.ValueMustBeNonNegative);
93 }
94 if (byteIndex > bytes.Length)
95 {
96 throw new ArgumentOutOfRangeException("byteIndex", System.SR.Format(System.SR.OffsetExceedsBufferSize, bytes.Length));
97 }
98 if (byteCount < 0)
99 {
100 throw new ArgumentOutOfRangeException("byteCount", System.SR.ValueMustBeNonNegative);
101 }
102 if (byteCount > bytes.Length - byteIndex)
103 {
104 throw new ArgumentOutOfRangeException("byteCount", System.SR.Format(System.SR.SizeExceedsRemainingBufferSpace, bytes.Length - byteIndex));
105 }
107 if (chars == null)
108 {
109 throw new ArgumentNullException("chars");
110 }
111 if (charIndex < 0)
112 {
113 throw new ArgumentOutOfRangeException("charIndex", System.SR.ValueMustBeNonNegative);
114 }
115 if (charIndex > chars.Length)
116 {
117 throw new ArgumentOutOfRangeException("charIndex", System.SR.Format(System.SR.OffsetExceedsBufferSize, chars.Length));
118 }
119 if (charCount < 0 || charCount > chars.Length - charIndex)
120 {
121 throw new ArgumentException(System.SR.XmlArrayTooSmall, "chars");
122 }
123 if (byteCount > 0)
124 {
126 }
127 return charCount;
128 }
static void EncodeToUtf16(ReadOnlySpan< byte > bytes, Span< char > chars, Casing casing=Casing.Upper)
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string ValueMustBeNonNegative
Definition SR.cs:296
static string SizeExceedsRemainingBufferSpace
Definition SR.cs:324
static string OffsetExceedsBufferSize
Definition SR.cs:322
static string XmlArrayTooSmall
Definition SR.cs:348
Definition SR.cs:7
override int GetCharCount(byte[] bytes, int index, int count)

References System.byteCount, System.byteIndex, System.bytes, System.charCount, System.charIndex, System.chars, System.HexConverter.EncodeToUtf16(), System.SR.Format(), System.Text.BinHexEncoding.GetCharCount(), System.SR.OffsetExceedsBufferSize, System.SR.SizeExceedsRemainingBufferSpace, System.SR.ValueMustBeNonNegative, and System.SR.XmlArrayTooSmall.