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

◆ WriteStartElementAsync_NoAdvanceState() [1/2]

Task System.Xml.XmlWellFormedWriter.WriteStartElementAsync_NoAdvanceState ( string prefix,
string localName,
string ns )
inlineprivate

Definition at line 3199 of file XmlWellFormedWriter.cs.

3200 {
3201 try
3202 {
3203 if (prefix == null)
3204 {
3205 if (ns != null)
3206 {
3207 prefix = LookupPrefix(ns);
3208 }
3209 if (prefix == null)
3210 {
3211 prefix = string.Empty;
3212 }
3213 }
3214 else if (prefix.Length > 0)
3215 {
3217 if (ns == null)
3218 {
3219 ns = LookupNamespace(prefix);
3220 }
3221 if (ns == null || (ns != null && ns.Length == 0))
3222 {
3224 }
3225 }
3226 if (ns == null)
3227 {
3228 ns = LookupNamespace(prefix);
3229 if (ns == null)
3230 {
3231 ns = string.Empty;
3232 }
3233 }
3234 if (_elemTop == 0 && _rawWriter != null)
3235 {
3237 }
3238 Task task = _writer.WriteStartElementAsync(prefix, localName, ns);
3239 if (task.IsSuccess())
3240 {
3242 return Task.CompletedTask;
3243 }
3244 return WriteStartElementAsync_FinishWrite(task, prefix, localName, ns);
3245 }
3246 catch
3247 {
3248 _currentState = State.Error;
3249 throw;
3250 }
3251 }
static string Xml_PrefixForEmptyNs
Definition SR.cs:286
Definition SR.cs:7
static Task CompletedTask
Definition Task.cs:1120
virtual void OnRootElement(ConformanceLevel conformanceLevel)
void WriteStartElementAsync_FinishWrite(string prefix, string localName, string ns)
override string LookupPrefix(string ns)
virtual Task WriteStartElementAsync(string? prefix, string localName, string? ns)
Definition XmlWriter.cs:596

References System.Xml.XmlWellFormedWriter._conformanceLevel, System.Xml.XmlWellFormedWriter._currentState, System.Xml.XmlWellFormedWriter._elemTop, System.Xml.XmlWellFormedWriter._rawWriter, System.Xml.XmlWellFormedWriter._writer, System.Xml.ArgumentException, System.Xml.XmlWellFormedWriter.CheckNCName(), System.Threading.Tasks.Task< TResult >.CompletedTask, System.Xml.XmlWellFormedWriter.LookupNamespace(), System.Xml.XmlWellFormedWriter.LookupPrefix(), System.Xml.XmlRawWriter.OnRootElement(), System.prefix, System.task, System.Xml.XmlWriter.WriteStartElementAsync(), System.Xml.XmlWellFormedWriter.WriteStartElementAsync_FinishWrite(), and System.SR.Xml_PrefixForEmptyNs.

Referenced by System.Xml.XmlWellFormedWriter.WriteStartElementAsync(), and System.Xml.XmlWellFormedWriter.WriteStartElementAsync_NoAdvanceState().