private FrameworkContainerForUnity CompositionTheTypes(Type[] types) { var visitor = new FrameworkDependencyVisitor(types); var root = visitor.VisitTypes(); WriteToSerialization(root); var container = new FrameworkContainerForUnity(); var resolver = new FrameworkCompositionResolverForUnity(container, root); resolver.Compose(); return(container); }
/// <summary> /// 구성 파일에서 <see cref="IFrameworkContainer"/> 로 구성을 합니다. /// </summary> /// <remarks> /// Umc, 2011-01-13. /// </remarks> /// <param name="container"> The container to act on. </param> /// <param name="path"> Full pathname of the file. </param> public static void Load(this IFrameworkContainer container, string path) { container = SetupFrameworkContainer(path, ref container); var xs = new XmlSerializer(typeof(UmcCoreIoCElement)); var containerElement = (UmcCoreIoCElement)xs.Deserialize(File.OpenRead(path)); containerElement.Verify(); IFrameworkComposable resolver = new FrameworkCompositionResolverForUnity((FrameworkContainerForUnity)container, containerElement); resolver.Compose(); }