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

◆ WriteProcessingInstructionAsync() [1/2]

override async Task System.Xml.XmlWellFormedWriter.WriteProcessingInstructionAsync ( string name,
string text )
inline

Definition at line 3746 of file XmlWellFormedWriter.cs.

3747 {
3748 _ = 4;
3749 try
3750 {
3751 if (name == null || name.Length == 0)
3752 {
3754 }
3755 CheckNCName(name);
3756 if (text == null)
3757 {
3758 text = string.Empty;
3759 }
3760 if (name.Length != 3 || !string.Equals(name, "xml", StringComparison.OrdinalIgnoreCase))
3761 {
3764 return;
3765 }
3766 if (_currentState != 0)
3767 {
3768 throw new ArgumentException((_conformanceLevel == ConformanceLevel.Document) ? System.SR.Xml_DupXmlDecl : System.SR.Xml_CannotWriteXmlDecl);
3769 }
3770 _xmlDeclFollows = true;
3772 if (_rawWriter != null)
3773 {
3775 }
3776 else
3777 {
3779 }
3780 }
3781 catch
3782 {
3783 _currentState = State.Error;
3784 throw;
3785 }
3786 }
static string Xml_EmptyName
Definition SR.cs:292
static string Xml_DupXmlDecl
Definition SR.cs:312
Definition SR.cs:7
new ConfiguredTaskAwaitable< TResult > ConfigureAwait(bool continueOnCapturedContext)
Definition Task.cs:226
virtual Task WriteXmlDeclarationAsync(XmlStandalone standalone)
virtual Task WriteProcessingInstructionAsync(string name, string? text)
Definition XmlWriter.cs:648

References System.Xml.XmlWellFormedWriter._conformanceLevel, System.Xml.XmlWellFormedWriter._currentState, System.Xml.XmlWellFormedWriter._rawWriter, System.Xml.XmlWellFormedWriter._writer, System.Xml.XmlWellFormedWriter._xmlDeclFollows, System.Xml.XmlWellFormedWriter.AdvanceStateAsync(), System.Xml.ArgumentException, System.Xml.XmlWellFormedWriter.CheckNCName(), System.Threading.Tasks.Task< TResult >.ConfigureAwait(), System.text, System.Xml.XmlWriter.WriteProcessingInstructionAsync(), System.Xml.XmlRawWriter.WriteXmlDeclarationAsync(), System.SR.Xml_CannotWriteXmlDecl, System.SR.Xml_DupXmlDecl, and System.SR.Xml_EmptyName.