示例#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);