Exemple #1
0
        protected override Expression VisitTransient(TransientCallSite callSite, CallSiteExpressionBuilderContext context)
        {
            var implType = callSite.ServiceCallSite.ImplementationType;

            // Elide calls to GetCaptureDisposable if the implemenation type isn't disposable
            return(TryCaptureDisposible(
                       implType,
                       context.ScopeParameter,
                       VisitCallSite(callSite.ServiceCallSite, context)));
        }
 protected override object VisitTransient(TransientCallSite transientCallSite, ServiceProviderEngineScope scope)
 {
     return(scope.CaptureDisposable(
                VisitCallSite(transientCallSite.ServiceCallSite, scope)));
 }
Exemple #3
0
 protected abstract TResult VisitTransient(TransientCallSite transientCallSite, TArgument argument);
Exemple #4
0
 protected override Type VisitTransient(TransientCallSite transientCallSite, CallSiteValidatorState state)
 {
     return(VisitCallSite(transientCallSite.ServiceCallSite, state));
 }
 protected override ILEmitCallSiteAnalysisResult VisitTransient(TransientCallSite transientCallSite, object argument) => VisitCallSite(transientCallSite.ServiceCallSite, argument);