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

◆ WriteChars()

override void System.Xml.XmlBaseWriter.WriteChars ( char[] chars,
int offset,
int count )
inlineinherited

Definition at line 1816 of file XmlBaseWriter.cs.

1817 {
1818 if (IsClosed)
1819 {
1820 ThrowClosed();
1821 }
1822 if (chars == null)
1823 {
1824 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("chars"));
1825 }
1826 if (offset < 0)
1827 {
1828 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("offset", System.SR.ValueMustBeNonNegative));
1829 }
1830 if (count < 0)
1831 {
1832 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("count", System.SR.ValueMustBeNonNegative));
1833 }
1834 if (count > chars.Length - offset)
1835 {
1836 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("count", System.SR.Format(System.SR.SizeExceedsRemainingBufferSpace, chars.Length - offset)));
1837 }
1838 if (count > 0)
1839 {
1840 FlushBase64();
1841 if (_attributeValue != null)
1842 {
1843 WriteAttributeText(new string(chars, offset, count));
1844 }
1845 if (!_isXmlnsAttribute)
1846 {
1849 EndContent();
1850 }
1851 }
1852 }
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
Definition SR.cs:7
void WriteAttributeText(string value)
void WriteEscapedText(string value)

References System.Xml.XmlBaseWriter._attributeValue, System.Xml.XmlBaseWriter._isXmlnsAttribute, System.Xml.XmlBaseWriter._writer, System.chars, System.count, System.Xml.XmlBaseWriter.EndContent(), System.Xml.XmlBaseWriter.FlushBase64(), System.SR.Format(), System.Xml.XmlBaseWriter.IsClosed, System.offset, System.SR.SizeExceedsRemainingBufferSpace, System.Xml.XmlBaseWriter.StartContent(), System.Xml.XmlBaseWriter.ThrowClosed(), System.Runtime.Serialization.DiagnosticUtility.ExceptionUtility.ThrowHelperError(), System.SR.ValueMustBeNonNegative, System.Xml.XmlBaseWriter.WriteAttributeText(), and System.Xml.XmlNodeWriter.WriteEscapedText().

Referenced by System.Xml.XmlBinaryWriter.WriteTextNode().