public RepositoryAutofacModuleBase( Func <Type, bool> typePredicate, AutofacModuleInstanceScope scope = AutofacModuleInstanceScope.SingleInstance) { this.TypePredicate = typePredicate; this.Scope = scope; }
AppendScope <TLimit, TActivatorData, TRegistrationStyle>( this IRegistrationBuilder <TLimit, TActivatorData, TRegistrationStyle> source, AutofacModuleInstanceScope scope) { switch (scope) { case AutofacModuleInstanceScope.InstancePerLifetimeScope: return(source.InstancePerLifetimeScope()); case AutofacModuleInstanceScope.InstancePerRequest: return(source.InstancePerRequest()); case AutofacModuleInstanceScope.InstancePerBackgroundJob: return(source.InstancePerBackgroundJob()); default: return(source.SingleInstance()); } }