コード例 #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();
        }
コード例 #2
0
 public AcceptanceTestingContainer()
 {
     builder = new LightInjectObjectBuilder();
 }