Exemplo n.º 1
0
        /// <summary>
        /// Creates IoC container.
        /// </summary>
        /// <param name="configuration"></param>
        /// <returns></returns>
        public static IocContainer CreateContainer(Action <ContainerConfig> configuration)
        {
            ContainerConfig config = new ContainerConfig();

            configuration(config);

            //Make the ServiceOptions object read-only, don't allow the further changes to the object.
            config.ContainerOptions.MakeReadOnly();

            return(new IocContainer(config));
        }
 /// <summary>
 /// Initializes a new instance of <see cref="DefaultServiceProvider"/> class with specified
 /// configuration.
 /// </summary>
 /// <param name="config"></param>
 public DefaultServiceProvider(ContainerConfig config)
 {
     _internalsm = new InternalServiceManager(config);
 }