Beispiel #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);
            }
Beispiel #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);
Beispiel #3
0
 protected virtual void CreateScopeCopy(object copyOwner, out IDependencyScope copy)
 => copy = new DependencyScope(outerScopeGetter: OuterScopeGetter, exporter: Exporter, ownsExporter: false, prohibitNewInstanceRequest: ProhibitNewInstanceRequest, owner: copyOwner);
Beispiel #4
0
 internal P_ServiceProviderApi(DependencyScope scope)
 {
     scope.EnsureNotNull(nameof(scope));
     //
     _scope = scope;
 }
Beispiel #5
0
 public abstract bool Invoke(DependencyScope scope, IDependencyResolutionContext ctx, out object dependency);
Beispiel #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);