Пример #1
0
        public void InitializeWithInternallyManagedContainer()
        {
            ownsContainer = true;

            var container = customContainer;

            if (container == null)
            {
                settings.AddStartupDiagnosticsSection("Container", new
                {
                    Type = "internal"
                });

                container = new LightInjectObjectBuilder();
            }
            else
            {
                var containerType = container.GetType();

                settings.AddStartupDiagnosticsSection("Container", new
                {
                    Type    = containerType.FullName,
                    Version = FileVersionRetriever.GetFileVersion(containerType)
                });
            }

            var commonObjectBuilder = new CommonObjectBuilder(container);

            ContainerConfiguration = commonObjectBuilder;
            Builder = commonObjectBuilder;

            ApplyRegistrations();
        }
 public AcceptanceTestingContainer()
 {
     builder = new LightInjectObjectBuilder();
 }