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

◆ WriteDeclAsync()

async Task System.Xml.XmlWellFormedWriter.Namespace.WriteDeclAsync ( XmlWriter writer,
XmlRawWriter rawWriter )
inlinepackage

Definition at line 183 of file XmlWellFormedWriter.cs.

184 {
185 if (rawWriter != null)
186 {
187 await rawWriter.WriteNamespaceDeclarationAsync(prefix, namespaceUri).ConfigureAwait(continueOnCapturedContext: false);
188 return;
189 }
190 if (prefix.Length != 0)
191 {
192 await writer.WriteStartAttributeAsync("xmlns", prefix, "http://www.w3.org/2000/xmlns/").ConfigureAwait(continueOnCapturedContext: false);
193 }
194 else
195 {
196 await writer.WriteStartAttributeAsync(string.Empty, "xmlns", "http://www.w3.org/2000/xmlns/").ConfigureAwait(continueOnCapturedContext: false);
197 }
198 await writer.WriteStringAsync(namespaceUri).ConfigureAwait(continueOnCapturedContext: false);
199 await writer.WriteEndAttributeAsync().ConfigureAwait(continueOnCapturedContext: false);
200 }

References System.Xml.XmlWellFormedWriter.Namespace.namespaceUri, System.Xml.XmlWellFormedWriter.Namespace.prefix, and System.writer.

Referenced by System.Xml.XmlWellFormedWriter.StartElementContentAsync_WithNS().