1 // System.Xml.XmlUrlResolver.cs
3 // Author: Duncan Mak (duncan@ximian.com)
4 // Atsushi Enomoto (ginga@kit.hi-ho.ne.jp)
14 public class XmlUrlResolver : XmlResolver
17 ICredentials credential;
18 WebClient webClientInternal;
21 if (webClientInternal == null)
22 webClientInternal = new WebClient ();
23 return webClientInternal;
28 public XmlUrlResolver ()
34 public override ICredentials Credentials
36 set { credential = value; }
40 [MonoTODO("Use Credentials; Uri must be absolute.")]
41 public override object GetEntity (Uri absoluteUri, string role, Type ofObjectToReturn)
43 // (MS documentation says) parameter role isn't used yet.
45 // webClient.Credentials = credential;
46 s = new XmlInputStream (webClient.OpenRead (absoluteUri.ToString ()));
47 if (s.GetType ().IsSubclassOf (ofObjectToReturn))
53 public override Uri ResolveUri (Uri baseUri, string relativeUri)
55 return new Uri (baseUri, relativeUri);