Esempio n. 1
0
        Configure(IContainer container, BindingLifecycle defaultObjectLifecycle,  IDefaultConventions defaultConventions, IDefaultBindings defaultBindings)
        {
            DefaultObjectLifecycle = defaultObjectLifecycle;

            container.Bind<IConfigure>(this);

            Container = container;
            ExcludeNamespacesForTypeDiscovery();
            SetupServiceLocator();

            defaultBindings.Initialize(container);
            defaultConventions.Initialize();

            InitializeProperties();
        }
Esempio n. 2
0
        Configure(IContainer container, BindingLifecycle defaultLifecycle,  IDefaultConventions defaultConventions, IDefaultBindings defaultBindings)
        {
            SystemName = "[Not Set]";

            container.DefaultLifecycle = defaultLifecycle;
            container.Bind<IConfigure>(this);

            Container = container;
            ExcludeNamespacesForTypeDiscovery();

            defaultBindings.Initialize(Container);
            defaultConventions.Initialize();
            
            InitializeProperties();
        }
Esempio n. 3
0
        Configure(
            IContainer container,
            IDefaultConventions defaultConventions,
            IDefaultBindings defaultBindings,
            AssembliesConfiguration assembliesConfiguration)
        {
            AssembliesConfiguration = assembliesConfiguration;
            container.Bind <IConfigure>(this);

            Container = container;

            defaultBindings.Initialize(Container);
            defaultConventions.Initialize();

            InitializeProperties();
        }
Esempio n. 4
0
        /// <summary>
        /// Configure with a specific <see cref="IContainer"/>, <see cref="IDefaultConventions"/> and <see cref="IDefaultBindings"/>
        /// </summary>
        /// <param name="container"><see cref="IContainer"/> to configure with</param>
        /// <param name="defaultConventions"><see cref="IDefaultConventions"/> to use</param>
        /// <param name="defaultBindings"><see cref="IDefaultBindings"/> to use</param>
        /// <param name="assembliesConfiguration"><see cref="AssembliesConfiguration"/> to use</param>
        /// <returns></returns>
        public static Configure With(
            IContainer container,
            IDefaultConventions defaultConventions,
            IDefaultBindings defaultBindings,
            AssembliesConfiguration assembliesConfiguration)
        {
            if (Instance == null)
            {
                lock (InstanceLock)
                {
                    Instance = new Configure(container, defaultConventions, defaultBindings, assembliesConfiguration);
                }
            }

            return(Instance);
        }
Esempio n. 5
0
        Configure(IContainer container, BindingLifecycle defaultLifecycle,  IDefaultConventions defaultConventions, IDefaultBindings defaultBindings, AssembliesConfiguration assembliesConfiguration)
        {
            SystemName = "[Not Set]";

            AssembliesConfiguration = assembliesConfiguration;

            container.DefaultLifecycle = defaultLifecycle;
            container.Bind<IConfigure>(this);

            Container = container;

            defaultBindings.Initialize(Container);
            defaultConventions.Initialize();
            
            InitializeProperties();
        }
Esempio n. 6
0
        /// <summary>
        /// Configure with a specific <see cref="IContainer"/>, <see cref="IDefaultConventions"/> and <see cref="IDefaultBindings"/>
        /// </summary>
        /// <param name="container"><see cref="IContainer"/> to configure with</param>
        /// <param name="defaultObjectLifecycle">Default <see cref="BindingLifecycle"/> for object creation/management</param>
        /// <param name="defaultConventions"><see cref="IDefaultConventions"/> to use</param>
        /// <param name="defaultBindings"><see cref="IDefaultBindings"/> to use</param>
        /// <returns></returns>
        public static Configure With(IContainer container, BindingLifecycle defaultObjectLifecycle, IDefaultConventions defaultConventions, IDefaultBindings defaultBindings)
        {
            if (Instance == null)
            {
                lock (InstanceLock)
                {
                    Instance = new Configure(container, defaultObjectLifecycle, defaultConventions, defaultBindings);
                }
            }

            return Instance;
        }
Esempio n. 7
0
 /// <summary>
 /// Configure with a specific <see cref="IContainer"/>, <see cref="IDefaultConventions"/> and <see cref="IDefaultBindings"/>
 /// </summary>
 /// <param name="container"><see cref="IContainer"/> to configure with</param>
 /// <param name="defaultConventions"><see cref="IDefaultConventions"/> to use</param>
 /// <param name="defaultBindings"><see cref="IDefaultBindings"/> to use</param>
 /// <returns></returns>
 public static Configure With(IContainer container, IDefaultConventions defaultConventions, IDefaultBindings defaultBindings)
 {
     return With(container, BindingLifecycle.Transient, defaultConventions, defaultBindings);
 }
Esempio n. 8
0
        Configure(IContainer container, BindingLifecycle defaultLifecycle, IDefaultConventions defaultConventions, IDefaultBindings defaultBindings, AssembliesConfiguration assembliesConfiguration)
        {
            SystemName = "[Not Set]";

            AssembliesConfiguration = assembliesConfiguration;

            container.DefaultLifecycle = defaultLifecycle;
            container.Bind <IConfigure>(this);

            Container = container;
            ExcludeNamespacesForTypeDiscovery();

            defaultBindings.Initialize(Container);
            defaultConventions.Initialize();

            InitializeProperties();
        }
Esempio n. 9
0
 /// <summary>
 /// Configure with a specific <see cref="IContainer"/>, <see cref="IDefaultConventions"/> and <see cref="IDefaultBindings"/>
 /// </summary>
 /// <param name="container"><see cref="IContainer"/> to configure with</param>
 /// <param name="defaultConventions"><see cref="IDefaultConventions"/> to use</param>
 /// <param name="defaultBindings"><see cref="IDefaultBindings"/> to use</param>
 /// <param name="assembliesConfiguration"><see cref="AssembliesConfiguration"/> to use</param>
 /// <returns></returns>
 public static Configure With(IContainer container, IDefaultConventions defaultConventions, IDefaultBindings defaultBindings, AssembliesConfiguration assembliesConfiguration)
 {
     return(With(container, BindingLifecycle.Transient, defaultConventions, defaultBindings, assembliesConfiguration));
 }