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

◆ HandleGeneralEntityReferenceAsync()

async Task< EntityType > System.Xml.XmlTextReaderImpl.HandleGeneralEntityReferenceAsync ( string name,
bool isInAttributeValue,
bool pushFakeEntityIfNullResolver,
int entityStartLinePos )
inlineprivate

Definition at line 11617 of file XmlTextReaderImpl.cs.

11618 {
11619 IDtdEntityInfo entity = null;
11620 if (_dtdInfo == null && _fragmentParserContext != null && _fragmentParserContext.HasDtdInfo && _dtdProcessing == DtdProcessing.Parse)
11621 {
11623 }
11624 if (_dtdInfo != null)
11625 {
11626 IDtdEntityInfo dtdEntityInfo;
11627 entity = (dtdEntityInfo = _dtdInfo.LookupEntity(name));
11628 if (dtdEntityInfo != null)
11629 {
11630 goto IL_012e;
11631 }
11632 }
11634 {
11635 SchemaEntity schemaEntity = new SchemaEntity(new XmlQualifiedName(name), isParameter: false);
11636 schemaEntity.Text = string.Empty;
11637 entity = schemaEntity;
11638 }
11639 else
11640 {
11642 }
11643 goto IL_012e;
11644 IL_012e:
11645 if (entity.IsUnparsedEntity)
11646 {
11648 {
11649 SchemaEntity schemaEntity2 = new SchemaEntity(new XmlQualifiedName(name), isParameter: false);
11650 schemaEntity2.Text = string.Empty;
11651 entity = schemaEntity2;
11652 }
11653 else
11654 {
11656 }
11657 }
11658 if (_standalone && entity.IsDeclaredInExternal)
11659 {
11661 }
11662 if (entity.IsExternal)
11663 {
11665 {
11667 return EntityType.Skipped;
11668 }
11669 if (_parsingMode == ParsingMode.SkipContent)
11670 {
11671 return EntityType.Skipped;
11672 }
11673 if (IsResolverNull)
11674 {
11676 {
11679 return EntityType.FakeExpanded;
11680 }
11681 return EntityType.Skipped;
11682 }
11686 }
11687 if (_parsingMode == ParsingMode.SkipContent)
11688 {
11689 return EntityType.Skipped;
11690 }
11691 PushInternalEntity(entity);
11694 }
static string Xml_ExternalEntityInAttValue
Definition SR.cs:126
static string Xml_UndeclaredEntity
Definition SR.cs:120
static string Xml_UnparsedEntityRef
Definition SR.cs:128
static string Xml_ExternalEntityInStandAloneDocument
Definition SR.cs:152
Definition SR.cs:7
void PushInternalEntity(IDtdEntityInfo entity)
XmlParserContext _fragmentParserContext
async Task< bool > PushExternalEntityAsync(IDtdEntityInfo entity)
void Throw(int pos, string res, string arg)
IDtdEntityInfo LookupEntity(string name)

References System.Xml.XmlTextReaderImpl._disableUndeclaredEntityCheck, System.Xml.XmlTextReaderImpl._dtdInfo, System.Xml.XmlTextReaderImpl._dtdProcessing, System.Xml.XmlTextReaderImpl._fragmentParserContext, System.Xml.XmlTextReaderImpl._parsingMode, System.Xml.XmlTextReaderImpl._ps, System.Xml.XmlTextReaderImpl._standalone, System.Xml.XmlTextReaderImpl._validatingReaderCompatFlag, System.Xml.Dictionary, System.Xml.XmlTextReaderImpl.ParsingState.entityId, System.Xml.XmlParserContext.HasDtdInfo, System.Xml.IDtdEntityInfo.IsDeclaredInExternal, System.Xml.IDtdEntityInfo.IsExternal, System.Xml.IDtdEntityInfo.IsUnparsedEntity, System.Xml.XmlTextReaderImpl.ParsingState.LineNo, System.Xml.IDtdInfo.LookupEntity(), System.Xml.IDtdEntityInfo.Name, System.Xml.XmlTextReaderImpl.ParseDtdFromParserContextAsync(), System.Xml.XmlTextReaderImpl.PushExternalEntityAsync(), System.Xml.XmlTextReaderImpl.PushInternalEntity(), System.Xml.XmlTextReaderImpl.Throw(), System.SR.Xml_ExternalEntityInAttValue, System.SR.Xml_ExternalEntityInStandAloneDocument, System.SR.Xml_UndeclaredEntity, and System.SR.Xml_UnparsedEntityRef.

Referenced by System.Xml.XmlTextReaderImpl.HandleEntityReferenceAsync().