示例#1
0
        /// <summary>
        /// Configure an instance of an <see cref="IUnityContainer"/>.
        /// </summary>
        /// <param name="container">The container to configure.</param>
        /// <param name="expression">An expression used for configuring the container.</param>
        public static void Configure(this IUnityContainer container, Action <IUnityRegistry> expression)
        {
            var registry = new UnityRegistry();

            expression(registry);

            registry.Configure(container);
        }
 public void AddRegistry(UnityRegistry registry)
 {
     registries.Add(registry);
 }