예제 #1
0
            public override bool Invoke(DependencyScope scope, IDependencyResolutionContext ctx, out object dependency)
            {
                scope.EnsureNotNull(nameof(scope));
                //
                var result = scope.ResolveDependency(ctx, out TDependency locDependency);

                dependency = locDependency;
                return(result);
            }
예제 #2
0
 protected virtual void CreateChildScope(object childOwner, out IDependencyScope child)
 => child = new DependencyScope(outerScope: this, exporter: NopDependencyExporter.Instance, ownsExporter: false, prohibitNewInstanceRequest: ProhibitNewInstanceRequest, owner: childOwner);
예제 #3
0
 protected virtual void CreateScopeCopy(object copyOwner, out IDependencyScope copy)
 => copy = new DependencyScope(outerScopeGetter: OuterScopeGetter, exporter: Exporter, ownsExporter: false, prohibitNewInstanceRequest: ProhibitNewInstanceRequest, owner: copyOwner);
예제 #4
0
 internal P_ServiceProviderApi(DependencyScope scope)
 {
     scope.EnsureNotNull(nameof(scope));
     //
     _scope = scope;
 }
예제 #5
0
 public abstract bool Invoke(DependencyScope scope, IDependencyResolutionContext ctx, out object dependency);
예제 #6
0
 protected virtual void BuildDependencyScope(IOuterDependencyScopeGetter outerScopeGetter, IDependencyExporter exporter, bool ownsExporter, out IDependencyScope scope)
 => scope = new DependencyScope(outerScopeGetter: outerScopeGetter, exporter: exporter, ownsExporter: ownsExporter, owner: this);