Exemple #1
0
        public static void LoadPackages(Action<IPackageFacility> configuration)
        {
            var facility = new PackageFacility();
            Diagnostics = new PackagingDiagnostics();
            var assemblyLoader = new AssemblyLoader(Diagnostics);
            var graph = new PackagingRuntimeGraph(Diagnostics, assemblyLoader);

            var codeLocation = findCallToLoadPackages();
            graph.PushProvenance(codeLocation);
            configuration(facility);
            facility.As<IPackagingRuntimeGraphConfigurer>().Configure(graph);

            graph.PopProvenance();

            graph.DiscoverAndLoadPackages(() =>
            {
                _assemblies.Clear();
                _assemblies.AddRange(assemblyLoader.Assemblies);
            });
        }
Exemple #2
0
        public static void LoadPackages(Action <IPackageFacility> configuration)
        {
            _packages.Clear();

            var facility = new PackageFacility();

            Diagnostics = new PackagingDiagnostics();
            var assemblyLoader = new AssemblyLoader(Diagnostics);
            var graph          = new PackagingRuntimeGraph(Diagnostics, assemblyLoader, _packages);

            var codeLocation = findCallToLoadPackages();

            graph.PushProvenance(codeLocation);
            configuration(facility);
            facility.As <IPackagingRuntimeGraphConfigurer>().Configure(graph);

            graph.PopProvenance();
            graph.DiscoverAndLoadPackages(() =>
            {
                _assemblies.Clear();
                _assemblies.AddRange(assemblyLoader.Assemblies);
            });
        }
 public void SetUp()
 {
     diagnostics = new PackagingDiagnostics();
 }
        public void SetUp()
        {
            diagnostics = new PackagingDiagnostics();

            loader = new StubPackageLoader("a", "b");
            package = new StubPackage("a");

            diagnostics.LogPackage(package, loader);
        }
        public void SetUp()
        {
            diagnostics = new PackagingDiagnostics();

            activator1 = new StubActivator();
            activator2 = new StubActivator();
            activator3 = new StubActivator();

            bootstrapper = new StubBootstrapper("Boot1", activator1, activator2, activator3);

            diagnostics.LogBootstrapperRun(bootstrapper, bootstrapper.Bootstrap(null));
        }
        public void SetUp()
        {
            diagnostics = new PackagingDiagnostics();
            package = new StubPackage("a");
            assembly = Assembly.GetExecutingAssembly();

            theProvenance = "from here";
            diagnostics.LogAssembly(package, assembly, theProvenance);
        }