public void RegisterAllTwice_Ok() { ComponentResolver componentResolver = new ComponentResolver(); componentResolver.RegisterAll(new MySynchInstaller()); var publisher = componentResolver.Resolve<IPublisher>("IPublisher.Local"); Assert.IsInstanceOf(typeof(ChangePublisher), publisher); ComponentResolver componentResolver1 = new ComponentResolver(); componentResolver.RegisterAll(new MySynchInstaller()); var publisher1 = componentResolver.Resolve<IPublisher>("IPublisher.Local"); Assert.IsInstanceOf(typeof(ChangePublisher), publisher1); }
protected override object GetService(Type service) { object obj = null; var parentWindow = ParentWindowResolver.Resolve(); if (parentWindow != null) { obj = parentWindow.GetVsService(service); } return(obj ?? base.GetService(service)); }
public IEnumerable <IComponent> GetComponents(Type type, IQualifier[] qualifierArray) { return(_componentResolver.Resolve(new ComponentResolvable(type, qualifierArray))); }