/// public virtual void SaveConfig() { if (!IsInitialized) { return; } KernelConfigManager.SaveConfiguration(Config); }
/// public void Load(IEnumerable <Uri> uris) { _urisToLoad = uris.ToList(); var proxyConfig = KernelConfigManager.GetConfiguration <ProxyConfig>(); if (AssemblyDownloadStarted != null) { AssemblyDownloadStarted(this, _urisToLoad); } if (_urisToLoad.Any()) { foreach (var uri in _urisToLoad) { var assemblyLoader = LoaderFactory.Create(); assemblyLoader.Initialize(uri, proxyConfig); assemblyLoader.AssemblyDownloaded += OnAssemblyDownloaded; assemblyLoader.AssemblyDownloadFailed += OnAssemblyDownloadFailed; _assemblyLoaders.Add(assemblyLoader); } } else { if (AssembliesDownloaded != null) { AssembliesDownloaded(this, new ReadOnlyCollection <Assembly>(_internalLoadedAssemblies)); } } foreach (var assemblyLoader in _assemblyLoaders.ToList()) { assemblyLoader.DownloadFile(); } }
/// <summary> /// Called when initializing. /// </summary> protected override void OnInitialize() { base.OnInitialize(); Config = KernelConfigManager.GetConfiguration <T>(); }