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

◆ WriteText() [2/4]

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

Definition at line 817 of file XmlCanonicalWriter.cs.

818 {
820 if (chars == null)
821 {
822 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("chars"));
823 }
824 if (offset < 0)
825 {
826 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.SR.ValueMustBeNonNegative));
827 }
828 if (offset > chars.Length)
829 {
830 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.SR.Format(System.SR.OffsetExceedsBufferSize, chars.Length)));
831 }
832 if (count < 0)
833 {
834 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("count", System.SR.ValueMustBeNonNegative));
835 }
836 if (count > chars.Length - offset)
837 {
838 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("count", System.SR.Format(System.SR.SizeExceedsRemainingBufferSpace, chars.Length - offset)));
839 }
840 if (_inStartElement)
841 {
843 }
844 else
845 {
847 }
848 }
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().