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

◆ ResolveUri()

virtual Uri System.Xml.XmlResolver.ResolveUri ( Uri? baseUri,
string? relativeUri )
inlinevirtual

Reimplemented in System.Xml.Resolvers.XmlPreloadedResolver, System.Xml.XmlSecureResolver, and System.Xml.XmlUrlResolver.

Definition at line 18 of file XmlResolver.cs.

19 {
20 if (baseUri == null || (!baseUri.IsAbsoluteUri && baseUri.OriginalString.Length == 0))
21 {
22 Uri uri = new Uri(relativeUri, UriKind.RelativeOrAbsolute);
23 if (!uri.IsAbsoluteUri && uri.OriginalString.Length > 0)
24 {
25 uri = new Uri(Path.GetFullPath(relativeUri));
26 }
27 return uri;
28 }
29 if (relativeUri == null || relativeUri.Length == 0)
30 {
31 return baseUri;
32 }
33 if (!baseUri.IsAbsoluteUri)
34 {
35 throw new NotSupportedException(System.SR.Xml_RelativeUriNotSupported);
36 }
37 return new Uri(baseUri, relativeUri);
38 }
static string GetFullPath(string path)
Definition Path.cs:881
static string Xml_RelativeUriNotSupported
Definition SR.cs:282
Definition SR.cs:7
UriKind
Definition UriKind.cs:4

References System.Xml.Dictionary, System.IO.Path.GetFullPath(), System.Uri.IsAbsoluteUri, System.Uri.OriginalString, and System.SR.Xml_RelativeUriNotSupported.

Referenced by System.Xml.XmlTextReaderImpl.XmlTextReaderImpl(), System.Xml.XmlValidatingReaderImpl.XmlValidatingReaderImpl(), System.Xml.XmlValidatingReaderImpl.XmlValidatingReaderImpl(), System.Xml.XmlTextReaderImpl.DtdParserProxy_PushExternalSubset(), System.Xml.XmlTextReaderImpl.DtdParserProxy_PushExternalSubsetAsync(), System.Xml.Xsl.Runtime.XmlQueryContext.GetDataSource(), System.Xml.Schema.XdrBuilder.LoadSchema(), System.Xml.Schema.XmlSchemaValidator.LoadSchema(), System.Xml.XmlTextReaderImpl.PushExternalEntity(), System.Xml.XmlTextReaderImpl.PushExternalEntityAsync(), System.Xml.XmlTextReaderImpl.PushExternalEntityOrSubset(), System.Xml.XmlTextReaderImpl.PushExternalEntityOrSubsetAsync(), System.Xml.Schema.Preprocessor.ResolveSchemaLocationUri(), System.Xml.Schema.SchemaCollectionPreprocessor.ResolveSchemaLocationUri(), System.Xml.Xsl.XsltOld.Compiler.ResolveUri(), System.Xml.Xsl.Xslt.XsltLoader.ResolveUri(), and System.Xml.XmlSecureResolver.ResolveUri().