예제 #1
0
        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);
        }
예제 #2
0
 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;
 }
예제 #3
0
 public void AddXMLFiles(string filePath, XMLResolverHandler resolverHandler)
 {
     tobeLoadInfoQueue.Enqueue(new ToBeLoadInfo(filePath, null, resolverHandler));
 }
예제 #4
0
 public ToBeLoadInfo(string path, LoadHandler onLoaded, XMLResolverHandler xmlResolver = null)
 {
     Path          = path;
     OnLoadHandler = onLoaded;
     XmlResolver   = xmlResolver;
 }