Example #1
0
 /// <summary>
 /// Initializes a new instance of the SingletonType class.
 /// </summary>
 /// <param name="targetType">The concrete service type.</param>
 /// <param name="container">The dependency container that contains the dependencies that will be used by the target type.</param>
 /// <param name="constructorResolver">The constructor resolver.</param>
 /// <param name="singletonEmitter">The emitter that will be responsible for emitting the singleton implementation.</param>
 public SingletonType(System.Type targetType, IDependencyContainer container, IConstructorResolver constructorResolver, ISingletonEmitter singletonEmitter)
     : this(new TransientType(targetType, container, constructorResolver), singletonEmitter)
 {
 }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the SingletonType class.
 /// </summary>
 /// <param name="targetType">The concrete service type.</param>
 /// <param name="container">The dependency container that contains the dependencies that will be used by the target type.</param>
 /// <param name="constructorResolver">The constructor resolver.</param>
 /// <param name="singletonEmitter">The emitter that will be responsible for emitting the singleton implementation.</param>
 public SingletonType(Type targetType, IDependencyContainer container, IConstructorResolver constructorResolver, ISingletonEmitter singletonEmitter)
     : this(new TransientType(targetType, container, constructorResolver), singletonEmitter)
 {
 }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the SingletonType class.
 /// </summary>
 /// <param name="singletonEmitter">The emitter that will be responsible for instantiating the singleton implementation.</param>
 /// <param name="implementation">The implementation that will be used to emitting a service instance.</param>
 public SingletonType(IStaticImplementation implementation, ISingletonEmitter singletonEmitter)
 {
     _implementation = implementation;
     _emitter        = singletonEmitter;
 }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the SingletonType class.
 /// </summary>
 /// <param name="singletonEmitter">The emitter that will be responsible for instantiating the singleton implementation.</param>
 /// <param name="implementation">The implementation that will be used to emitting a service instance.</param>
 public SingletonType(IStaticImplementation implementation, ISingletonEmitter singletonEmitter)
 {
     _implementation = implementation;
     _emitter = singletonEmitter;
 }