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

◆ WriteText() [1/4]

void System.Xml.XmlCanonicalWriter.WriteText ( byte[] chars,
int offset,
int count )
inline

Definition at line 765 of file XmlCanonicalWriter.cs.

766 {
768 if (chars == null)
769 {
770 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("chars"));
771 }
772 if (offset < 0)
773 {
774 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.SR.ValueMustBeNonNegative));
775 }
776 if (offset > chars.Length)
777 {
778 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.SR.Format(System.SR.OffsetExceedsBufferSize, chars.Length)));
779 }
780 if (count < 0)
781 {
782 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("count", System.SR.ValueMustBeNonNegative));
783 }
784 if (count > chars.Length - offset)
785 {
786 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("count", System.SR.Format(System.SR.SizeExceedsRemainingBufferSpace, chars.Length - offset)));
787 }
788 if (_inStartElement)
789 {
791 }
792 else
793 {
795 }
796 }
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
Definition SR.cs:7

References System.Xml.XmlCanonicalWriter._elementWriter, System.Xml.XmlCanonicalWriter._inStartElement, System.Xml.XmlCanonicalWriter._writer, System.chars, System.count, System.SR.Format(), System.offset, System.SR.OffsetExceedsBufferSize, System.SR.SizeExceedsRemainingBufferSpace, System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(), System.Xml.XmlCanonicalWriter.ThrowIfClosed(), System.SR.ValueMustBeNonNegative, and System.Xml.XmlUTF8NodeWriter.WriteText().