Esempio n. 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);
            });
        }
Esempio n. 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);
            });
        }
Esempio n. 3
0
 void IPackagingRuntimeGraphConfigurer.Configure(PackagingRuntimeGraph graph)
 {
     _configurations.Each(x => x(graph));
 }
Esempio n. 4
0
 void IPackagingRuntimeGraphConfigurer.Configure(PackagingRuntimeGraph graph)
 {
     _configurations.Each(x => x(graph));
 }