/// <summary> /// Registered instance will live only within liftimescope. /// </summary> /// <param name="resolvable">The resolvable builder.</param> /// <returns>The resolvable builder.</returns> public static ItemRegistrationBase PerLifetimeScope(this ItemRegistrationBase resolvable) { return(resolvable.WithScope(new PerLifetimeScope())); }
/// <summary> /// Registered instance will have only one instance per container including nested liftime scopes. /// </summary> /// <param name="resolvable">The resolvable builder.</param> /// <returns>The resolvable builder.</returns> public static ItemRegistrationBase SingleInstance(this ItemRegistrationBase resolvable) { return(resolvable.WithScope(new SingleInstanceScope())); }
/// <summary> /// Default. Every instance request will produce new instance. /// </summary> /// <param name="resolvable">The resolvable builder.</param> /// <returns>The resolvable builder.</returns> public static ItemRegistrationBase PerDependency(this ItemRegistrationBase resolvable) { return(resolvable.WithScope(new PerDependencyScope())); }