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

◆ WriteDocTypeAsync() [1/2]

override async Task System.Xml.XmlWellFormedWriter.WriteDocTypeAsync ( string name,
string pubid,
string sysid,
string subset )
inline

Definition at line 3073 of file XmlWellFormedWriter.cs.

3074 {
3075 _ = 1;
3076 try
3077 {
3078 if (name == null || name.Length == 0)
3079 {
3081 }
3082 XmlConvert.VerifyQName(name, ExceptionType.XmlException);
3083 if (_conformanceLevel == ConformanceLevel.Fragment)
3084 {
3086 }
3088 if (_dtdWritten)
3089 {
3090 _currentState = State.Error;
3092 }
3093 if (_conformanceLevel == ConformanceLevel.Auto)
3094 {
3095 _conformanceLevel = ConformanceLevel.Document;
3097 }
3098 if (_checkCharacters)
3099 {
3100 int invCharIndex;
3101 if (pubid != null && (invCharIndex = XmlCharType.IsPublicId(pubid)) >= 0)
3102 {
3104 object[] args = XmlException.BuildCharExceptionArgs(pubid, invCharIndex);
3106 }
3107 if (sysid != null && (invCharIndex = XmlCharType.IsOnlyCharData(sysid)) >= 0)
3108 {
3110 object[] args = XmlException.BuildCharExceptionArgs(sysid, invCharIndex);
3112 }
3113 if (subset != null && (invCharIndex = XmlCharType.IsOnlyCharData(subset)) >= 0)
3114 {
3116 object[] args = XmlException.BuildCharExceptionArgs(subset, invCharIndex);
3118 }
3119 }
3121 _dtdWritten = true;
3122 }
3123 catch
3124 {
3125 _currentState = State.Error;
3126 throw;
3127 }
3128 }
static string Xml_EmptyName
Definition SR.cs:292
static string Xml_DtdNotAllowedInFragment
Definition SR.cs:164
static string Format(string resourceFormat, object p1)
Definition SR.cs:118
static string Xml_InvalidCharacter
Definition SR.cs:110
static string Xml_DtdAlreadyWritten
Definition SR.cs:330
Definition SR.cs:7
new ConfiguredTaskAwaitable< TResult > ConfigureAwait(bool continueOnCapturedContext)
Definition Task.cs:226
static readonly State[] s_stateTableDocument
virtual Task WriteDocTypeAsync(string name, string? pubid, string? sysid, string? subset)
Definition XmlWriter.cs:591

References System.Xml.XmlWellFormedWriter._checkCharacters, System.Xml.XmlWellFormedWriter._conformanceLevel, System.Xml.XmlWellFormedWriter._currentState, System.Xml.XmlWellFormedWriter._dtdWritten, System.Xml.XmlWellFormedWriter._stateTable, System.Xml.XmlWellFormedWriter._writer, System.Xml.XmlWellFormedWriter.AdvanceStateAsync(), System.Xml.ArgumentException, System.Xml.XmlException.BuildCharExceptionArgs(), System.Threading.Tasks.Task< TResult >.ConfigureAwait(), System.Xml.Dictionary, System.SR.Format(), System.Xml.XmlCharType.IsOnlyCharData(), System.Xml.XmlCharType.IsPublicId(), System.Xml.XmlWellFormedWriter.s_stateTableDocument, System.Xml.XmlConvert.VerifyQName(), System.Xml.XmlWriter.WriteDocTypeAsync(), System.SR.Xml_DtdAlreadyWritten, System.SR.Xml_DtdNotAllowedInFragment, System.SR.Xml_EmptyName, and System.SR.Xml_InvalidCharacter.