Ejemplo n.º 1
0
 /// <summary>
 /// Mounts resource container from configuration by loading the assemblies and collecting resources using AssemblyResourceCollector strategy
 /// </summary>
 private void mountResourceContainers()
 {
     this.Log.Info("Mounting resource containers");
     foreach (var mount in this.HostConfiguration.Mounts)
     {
         Log.DebugFormat("Mounting resource container for {{{0}}}", mount.Path);
         Assembly mountAssembly = Assembly.LoadFile(Path.GetFullPath(mount.Assembly));
         AssemblyResourceCollector collector = new AssemblyResourceCollector(mountAssembly);
         MountedResourceContainer resourceContainer = new MountedResourceContainer(collector.Collect(), mount.Path);
         HostService.MountResourceContainer(resourceContainer);
     }
 }
 /// <summary>
 /// Add a MountedResourceContainer to container storage
 /// </summary>
 public void MountResourceContainer(MountedResourceContainer container)
 {
     base._logger.InfoFormat("Mounting resource container for {{{0}}}", container.MountPath);
     this._mountedResourceContainers.Add(container.MountPath, container);
 }