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

◆ InitFragmentReader()

void System.Xml.XmlTextReaderImpl.InitFragmentReader ( XmlNodeType fragmentType,
XmlParserContext parserContext,
bool allowXmlDeclFragment )
inlineprivate

Definition at line 3177 of file XmlTextReaderImpl.cs.

3178 {
3180 if (parserContext != null)
3181 {
3182 if (parserContext.NamespaceManager != null)
3183 {
3184 _namespaceManager = parserContext.NamespaceManager;
3186 }
3187 else
3188 {
3189 _namespaceManager = new XmlNamespaceManager(_nameTable);
3190 }
3191 _ps.baseUriStr = parserContext.BaseURI;
3192 _ps.baseUri = null;
3195 }
3196 else
3197 {
3198 _namespaceManager = new XmlNamespaceManager(_nameTable);
3199 _ps.baseUriStr = string.Empty;
3200 _ps.baseUri = null;
3201 }
3203 if (fragmentType <= XmlNodeType.Attribute)
3204 {
3205 if (fragmentType != XmlNodeType.Element)
3206 {
3207 if (fragmentType != XmlNodeType.Attribute)
3208 {
3209 goto IL_012e;
3210 }
3211 _ps.appendMode = false;
3212 _parsingFunction = ParsingFunction.SwitchToInteractive;
3213 _nextParsingFunction = ParsingFunction.FragmentAttribute;
3214 }
3215 else
3216 {
3217 _nextParsingFunction = ParsingFunction.DocumentContent;
3218 }
3219 }
3220 else if (fragmentType != XmlNodeType.Document)
3221 {
3222 if (fragmentType != XmlNodeType.XmlDeclaration || !allowXmlDeclFragment)
3223 {
3224 goto IL_012e;
3225 }
3226 _ps.appendMode = false;
3227 _parsingFunction = ParsingFunction.SwitchToInteractive;
3228 _nextParsingFunction = ParsingFunction.XmlDeclarationFragment;
3229 }
3231 _fragment = true;
3232 return;
3233 IL_012e:
3235 }
static string Xml_PartialContentNodeTypeNotSupportedEx
Definition SR.cs:104
Definition SR.cs:7
virtual ? string LookupNamespace(string prefix)
XmlNamespaceManager _namespaceManager
XmlParserContext _fragmentParserContext
void Throw(int pos, string res, string arg)

References System.Xml.XmlTextReaderImpl._fragment, System.Xml.XmlTextReaderImpl._fragmentParserContext, System.Xml.XmlTextReaderImpl._fragmentType, System.Xml.XmlTextReaderImpl._namespaceManager, System.Xml.XmlTextReaderImpl._nameTable, System.Xml.XmlTextReaderImpl._nextParsingFunction, System.Xml.XmlTextReaderImpl._parsingFunction, System.Xml.XmlTextReaderImpl._ps, System.Xml.XmlTextReaderImpl._reportedBaseUri, System.Xml.XmlTextReaderImpl.ParsingState.baseUriStr, System.Xml.Dictionary, System.Xml.XmlNamespaceManager.LookupNamespace(), System.Xml.XmlTextReaderImpl.Throw(), and System.SR.Xml_PartialContentNodeTypeNotSupportedEx.

Referenced by System.Xml.XmlTextReaderImpl.XmlTextReaderImpl(), System.Xml.XmlTextReaderImpl.XmlTextReaderImpl(), and System.Xml.XmlTextReaderImpl.XmlTextReaderImpl().