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

◆ WriteBinHex()

override void System.Runtime.Serialization.Json.XmlJsonWriter.WriteBinHex ( byte[] buffer,
int index,
int count )
inlinevirtual

Reimplemented from System.Xml.XmlWriter.

Definition at line 406 of file XmlJsonWriter.cs.

407 {
408 if (buffer == null)
409 {
410 throw new ArgumentNullException("buffer");
411 }
412 if (index < 0)
413 {
414 throw new ArgumentOutOfRangeException("index", System.SR.ValueMustBeNonNegative);
415 }
416 if (count < 0)
417 {
418 throw new ArgumentOutOfRangeException("count", System.SR.ValueMustBeNonNegative);
419 }
420 if (count > buffer.Length - index)
421 {
422 throw new ArgumentOutOfRangeException("count", System.SR.Format(System.SR.JsonSizeExceedsRemainingBufferSpace, buffer.Length - index));
423 }
424 StartText();
426 }
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string JsonSizeExceedsRemainingBufferSpace
Definition SR.cs:544
static string ValueMustBeNonNegative
Definition SR.cs:296
Definition SR.cs:7
unsafe string GetString(byte *bytes, int byteCount)
Definition Encoding.cs:973

References System.buffer, System.count, System.SR.Format(), System.Text.Encoding.GetString(), System.index, System.SR.JsonSizeExceedsRemainingBufferSpace, System.Runtime.Serialization.Json.XmlJsonWriter.StartText(), System.SR.ValueMustBeNonNegative, and System.Runtime.Serialization.Json.XmlJsonWriter.WriteEscapedJsonString().