Ejemplo n.º 1
0
        public static void InitializeDependencyContainer(IAutoFacRegistrar dependencyRegistrar)
        {
            ContainerBuilder builder = new ContainerBuilder();

            dependencyRegistrar.RegisterDependencies(builder);
            DependencyContainer = builder.Build(ContainerBuildOptions.IgnoreStartableComponents);
        }
Ejemplo n.º 2
0
        public static void InitializeDependencyContainer(IAutoFacRegistrar dependencyRegistrar)
        {
            ContainerBuilder builder = new ContainerBuilder();

            dependencyRegistrar.RegisterDependencies(builder);

            // IgnoreStartableComponents - Prevents "phantom" executions of the Start() method
            // on a MonoBehaviour because someone accidentally did something funky with a DI registration.
            DependencyContainer = builder.Build(ContainerBuildOptions.IgnoreStartableComponents);
        }