5
어떻게 (아마도 실수로) 같은 조립 2 부MEF로 중복 모듈을 방지하는 방법은 무엇입니까?
Assembly1.dll
Assembly2.dll의 존재의 경우 (복사에 중복 모듈을로드 MEF에서 방지 할 수 있습니다 Assembly1의)
[ImportMany] public IList<IModule> Modules { get; private set; } public void BuildUp() { Modules = new List<IModule>(); var catalog = new DirectoryCatalog(@".\Modules"); var container = new CompositionContainer(catalog); container.ComposeParts(this); }
MEF에서로드되는 IModule의 중복 유형 구현을 방지해야합니다. 고마워. 내가 이런 식으로 노력할거야. –