Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DependencyContainer"/> class.
        /// </summary>
        public DependencyContainer()
        {
            RegisteredTypes = new TypesConcurrentDictionary(this);
            Register(this);

            // Only register the TinyMessenger singleton if we are the root container
            if (Parent == null)
            {
                Register <IMessageHub, MessageHub>();
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RegisterOptions" /> class.
 /// </summary>
 /// <param name="registeredTypes">The registered types.</param>
 /// <param name="registration">The registration.</param>
 public RegisterOptions(TypesConcurrentDictionary registeredTypes, DependencyContainer.TypeRegistration registration)
 {
     _registeredTypes = registeredTypes;
     _registration    = registration;
 }