Handles loading a collection of scripts.
Наследование: ResourceLoader
 public void Add_Delimited_Urls()
 {
     ScriptLoader loader = new ScriptLoader();
     loader.AddUrl("one.js; two.js", ";");
     foreach (string url in loader)
     {
         Log.Info("> URL: " + url);
     }
 }
        /// <summary>Loads the specified library.</summary>
        /// <param name="library">Flag indicating the library to load.</param>
        /// <param name="callback">Callback to invoke upon completion.</param>
        public void LoadLibrary(ScriptLibrary library, Action callback)
        {
            // Setup initial conditions.
            if (IsLibraryLoaded(library))
            {
                Helper.Invoke(callback);
                return;
            }

            // Download script.
            ScriptLoader loader = new ScriptLoader();
            string url = Scripts.Url(library);
            loader.LoadComplete += delegate
                                       {
                                           CacheUrl(url);
                                           Helper.Invoke(callback);
                                       };
            loader.AddUrl(url);
            loader.Start();
        }
 private ScriptLoader CreateScriptLoader()
 {
     ScriptLoader loader = new ScriptLoader();
     foreach (string url in ScriptUrls.Split(PathDivider))
     {
         loader.AddUrl(FormatUrl(url), PathDivider);
     }
     return loader;
 }