public IPipelineGraph NewChild() { var childGraph = new PluginGraph(); var instances = new ComplexInstanceGraph(_root, childGraph, ContainerRole.ProfileOrChild); return new PipelineGraph(childGraph, instances, _root, _root.Singletons, _root.Transients); }
public IPipelineGraph ToNestedGraph() { var nestedPluginGraph = new PluginGraph(Profile + " - Nested"); var instances = new ComplexInstanceGraph(this, nestedPluginGraph, ContainerRole.Nested); return(new PipelineGraph(nestedPluginGraph, instances, this, _singletons, new NestedContainerTransientObjectCache())); }
public IPipelineGraph NewChild() { var childGraph = new PluginGraph(); var instances = new ComplexInstanceGraph(_root, childGraph, ContainerRole.ProfileOrChild); // RIGHT HERE, WE NEED TO USE A DIFFERENT SINGLETON CACHE return(new PipelineGraph(childGraph, instances, _root, _root.Singletons, _root.Transients)); }
public IPipelineGraph NewChild(PluginGraph parent) { var childGraph = parent.NewChild(); var instances = new ComplexInstanceGraph(_root, childGraph, ContainerRole.ProfileOrChild); var transientTracking = parent.TransientTracking == TransientTracking.DefaultNotTrackedAtRoot ? _root.Transients : new TrackingTransientCache(); return new PipelineGraph(childGraph, instances, _root, _root.Singletons, transientTracking); }
public IPipelineGraph NewChild() { var childGraph = new PluginGraph(); var instances = new ComplexInstanceGraph(_root, childGraph, ContainerRole.ProfileOrChild); // RIGHT HERE, WE NEED TO USE A DIFFERENT SINGLETON CACHE return new PipelineGraph(childGraph, instances, _root, _root.Singletons, _root.Transients); }
public Profiles(PluginGraph pluginGraph, IPipelineGraph root) { _profiles = new Cache<string, IPipelineGraph>(name => { var profileGraph = pluginGraph.Profile(name); var instances = new ComplexInstanceGraph(root, profileGraph, ContainerRole.ProfileOrChild); return new PipelineGraph(profileGraph, instances, root, root.Singletons, root.Transients); }); }
public Profiles(PluginGraph pluginGraph, IPipelineGraph root) { _profiles = new Cache <string, IPipelineGraph>(name => { var profileGraph = pluginGraph.Profile(name); var instances = new ComplexInstanceGraph(root, profileGraph, ContainerRole.ProfileOrChild); return(new PipelineGraph(profileGraph, instances, root, root.Singletons, root.Transients)); }); }
public IPipelineGraph ToNestedGraph() { var nestedPluginGraph = _pluginGraph.ToNestedGraph(); var instances = new ComplexInstanceGraph(this, nestedPluginGraph, ContainerRole.Nested); return(new PipelineGraph(nestedPluginGraph, instances, this, _singletons, new ContainerSpecificObjectCache())); }
public IPipelineGraph For(string profileName) { return _profiles.GetOrAdd(profileName, key => { var profileGraph = _pluginGraph.Profile(profileName); var instances = new ComplexInstanceGraph(_root, profileGraph, ContainerRole.ProfileOrChild); return new PipelineGraph(profileGraph, instances, _root, _root.Singletons, _root.Transients); }); }
public IPipelineGraph For(string profileName) { return(_profiles.GetOrAdd(profileName, key => { var profileGraph = _pluginGraph.Profile(profileName); var instances = new ComplexInstanceGraph(_root, profileGraph, ContainerRole.ProfileOrChild); return new PipelineGraph(profileGraph, instances, _root, _root.Singletons, _root.Transients); })); }
public IPipelineGraph NewChild(PluginGraph parent) { var childGraph = parent.NewChild(); var instances = new ComplexInstanceGraph(_root, childGraph, ContainerRole.ProfileOrChild); var transientTracking = parent.TransientTracking == TransientTracking.DefaultNotTrackedAtRoot ? _root.Transients : new TrackingTransientCache(); return(new PipelineGraph(childGraph, instances, _root, _root.Singletons, transientTracking)); }
public IPipelineGraph NewChild(PluginGraph parent) { var childGraph = new PluginGraph { Parent = parent }; var instances = new ComplexInstanceGraph(_root, childGraph, ContainerRole.ProfileOrChild); return(new PipelineGraph(childGraph, instances, _root, _root.Singletons, _root.Transients)); }
public IPipelineGraph ToNestedGraph(TypeArguments arguments = null) { var nestedPluginGraph = _pluginGraph.ToNestedGraph(); if (arguments != null) { foreach (var pair in arguments.Defaults) { nestedPluginGraph.Families[pair.Key] = PluginFamily.ExplicitOverride(pair.Key, pair.Value); } } var instances = new ComplexInstanceGraph(this, nestedPluginGraph, ContainerRole.Nested); return(new PipelineGraph(nestedPluginGraph, instances, this, _singletons, new ContainerSpecificObjectCache())); }
public IPipelineGraph For(string profileName, object syncLock) { if (!_profiles.ContainsKey(profileName)) { lock (syncLock) { if (!_profiles.ContainsKey(profileName)) { var profileGraph = _pluginGraph.Profile(profileName); var instances = new ComplexInstanceGraph(_root, profileGraph, ContainerRole.ProfileOrChild); var pipeline = new PipelineGraph(profileGraph, instances, _root, _root.Singletons, _root.Transients); Container.CorrectSingletonLifecycleForChild(pipeline); _profiles[profileName] = pipeline; } } } return(_profiles[profileName]); }
public IPipelineGraph ToNestedGraph() { var nestedPluginGraph = new PluginGraph(Profile + " - Nested"); var instances = new ComplexInstanceGraph(this, nestedPluginGraph, ContainerRole.Nested); return new PipelineGraph(nestedPluginGraph, instances, this, _singletons, new NestedContainerTransientObjectCache()); }
public IPipelineGraph ToNestedGraph(TypeArguments arguments = null) { var nestedPluginGraph = _pluginGraph.ToNestedGraph(); if (arguments != null) { foreach (var pair in arguments.Defaults) { nestedPluginGraph.Families[pair.Key] = PluginFamily.ExplicitOverride(pair.Key, pair.Value); } } var instances = new ComplexInstanceGraph(this, nestedPluginGraph, ContainerRole.Nested); return new PipelineGraph(nestedPluginGraph, instances, this, _singletons, new ContainerSpecificObjectCache()); }
public IPipelineGraph ToNestedGraph() { var nestedPluginGraph = _pluginGraph.ToNestedGraph(); var instances = new ComplexInstanceGraph(this, nestedPluginGraph, ContainerRole.Nested); return new PipelineGraph(nestedPluginGraph, instances, this, _singletons, new ContainerSpecificObjectCache()); }