예제 #1
0
 /// <summary>
 ///     Sets the lifecycle.
 /// </summary>
 protected virtual void SetLifetimeScope(DependencyLifecycle lifecycle, RegistrationData data)
 {
     if (lifecycle == DependencyLifecycle.SingleInstance)
     {
         data.Sharing  = InstanceSharing.Shared;
         data.Lifetime = new RootScopeLifetime();
         return;
     }
     if (lifecycle == DependencyLifecycle.TransientInstance)
     {
         data.Sharing  = InstanceSharing.None;
         data.Lifetime = new CurrentScopeLifetime();
         return;
     }
     Should.MethodBeSupported(false,
                              "SetLifetimeScope(DependencyLifecycle dependencyLifecycle, IRegistrationBuilder<object, ConcreteReflectionActivatorData, SingleRegistrationStyle> builder)");
 }
예제 #2
0
 public void Unbind(Type service)
 {
     Should.MethodBeSupported(!ThrowOnUnbind, "Unbind(Type service)");
     Tracer.Error("Unbind call on Autofac container type " + service);
 }