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

◆ WriteProcessingInstruction() [1/2]

override void System.Xml.XmlWellFormedWriter.WriteProcessingInstruction ( string name,
string text )
inline

Definition at line 1875 of file XmlWellFormedWriter.cs.

1876 {
1877 try
1878 {
1879 if (name == null || name.Length == 0)
1880 {
1882 }
1883 CheckNCName(name);
1884 if (text == null)
1885 {
1886 text = string.Empty;
1887 }
1888 if (name.Length == 3 && string.Equals(name, "xml", StringComparison.OrdinalIgnoreCase))
1889 {
1890 if (_currentState != 0)
1891 {
1892 throw new ArgumentException((_conformanceLevel == ConformanceLevel.Document) ? System.SR.Xml_DupXmlDecl : System.SR.Xml_CannotWriteXmlDecl);
1893 }
1894 _xmlDeclFollows = true;
1895 AdvanceState(Token.PI);
1896 if (_rawWriter != null)
1897 {
1899 }
1900 else
1901 {
1903 }
1904 }
1905 else
1906 {
1907 AdvanceState(Token.PI);
1909 }
1910 }
1911 catch
1912 {
1913 _currentState = State.Error;
1914 throw;
1915 }
1916 }
static string Xml_EmptyName
Definition SR.cs:292
static string Xml_DupXmlDecl
Definition SR.cs:312
Definition SR.cs:7
virtual void WriteXmlDeclaration(XmlStandalone standalone)
void WriteProcessingInstruction(string name, string? text)

References System.Xml.XmlWellFormedWriter._conformanceLevel, System.Xml.XmlWellFormedWriter._currentState, System.Xml.XmlWellFormedWriter._rawWriter, System.Xml.XmlWellFormedWriter._writer, System.Xml.XmlWellFormedWriter._xmlDeclFollows, System.Xml.XmlWellFormedWriter.AdvanceState(), System.Xml.ArgumentException, System.Xml.XmlWellFormedWriter.CheckNCName(), System.text, System.Xml.XmlWriter.WriteProcessingInstruction(), System.Xml.XmlRawWriter.WriteXmlDeclaration(), System.SR.Xml_CannotWriteXmlDecl, System.SR.Xml_DupXmlDecl, and System.SR.Xml_EmptyName.