NServiceBus.AutofacExtensions.ExistingLifetimeScope C# (CSharp) Method

ExistingLifetimeScope() public static method

Use the a pre-configured AutoFac lifetime scope.
public static ExistingLifetimeScope ( this customizations, ILifetimeScope lifetimeScope ) : void
customizations this
lifetimeScope ILifetimeScope The existing lifetime scope to use.
return void
        public static void ExistingLifetimeScope(this ContainerCustomizations customizations, ILifetimeScope lifetimeScope)
        {
            customizations.Settings.Set<AutofacBuilder.LifetimeScopeHolder>(new AutofacBuilder.LifetimeScopeHolder(lifetimeScope));
        }
    }
AutofacExtensions