public void LoadXML(string url, LoadHandler completeHandler, XMLResolverHandler resolverHandler) { LoadHelper loadHelper = new LoadHelper(url, completeHandler, this.ErrorHandler, this.ProgressHandler, resolverHandler); IDownloader downloader = FactoryDownloader.GetDownloader(loadHelper); downloader.StartDown(loadHelper); }
public LoadHelper(string url, LoadHandler completeHandler, LoadHandler errorHandler, LoadHandler progressHandler, XMLResolverHandler resolverHandler = null) { this.CompleteHandler = completeHandler; this.ErrorHandler = errorHandler; this.ProgressHandler = progressHandler; this.OriginalUrl = url; this.ExtensionName = Path.GetExtension(url); this._url = this.ConvertUrl(url, ExtensionName); this.IsPublicRes = this.FileName.Contains("_public"); this.XMLResolver = resolverHandler; }
public void AddXMLFiles(string filePath, XMLResolverHandler resolverHandler) { tobeLoadInfoQueue.Enqueue(new ToBeLoadInfo(filePath, null, resolverHandler)); }
public ToBeLoadInfo(string path, LoadHandler onLoaded, XMLResolverHandler xmlResolver = null) { Path = path; OnLoadHandler = onLoaded; XmlResolver = xmlResolver; }