Пример #1
0
 /// <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()));
 }
Пример #2
0
 /// <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()));
 }
Пример #3
0
 /// <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()));
 }