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); }
protected virtual void CreateChildScope(object childOwner, out IDependencyScope child) => child = new DependencyScope(outerScope: this, exporter: NopDependencyExporter.Instance, ownsExporter: false, prohibitNewInstanceRequest: ProhibitNewInstanceRequest, owner: childOwner);
protected virtual void CreateScopeCopy(object copyOwner, out IDependencyScope copy) => copy = new DependencyScope(outerScopeGetter: OuterScopeGetter, exporter: Exporter, ownsExporter: false, prohibitNewInstanceRequest: ProhibitNewInstanceRequest, owner: copyOwner);
internal P_ServiceProviderApi(DependencyScope scope) { scope.EnsureNotNull(nameof(scope)); // _scope = scope; }
public abstract bool Invoke(DependencyScope scope, IDependencyResolutionContext ctx, out object dependency);
protected virtual void BuildDependencyScope(IOuterDependencyScopeGetter outerScopeGetter, IDependencyExporter exporter, bool ownsExporter, out IDependencyScope scope) => scope = new DependencyScope(outerScopeGetter: outerScopeGetter, exporter: exporter, ownsExporter: ownsExporter, owner: this);