public void FacilityRegistersRequiredComponents() { Assert.IsTrue(kernel.HasComponent(typeof(MethodValidatorMetaStore))); Assert.IsTrue(kernel.HasComponent(typeof(MethodValidatorInterceptor))); IContributeComponentModelConstruction methodValidatorContributor = null; foreach (IContributeComponentModelConstruction contributor in kernel.ComponentModelBuilder.Contributors) { if (contributor is MethodValidatorComponentInspector) { methodValidatorContributor = contributor; } } Assert.IsNotNull(methodValidatorContributor); }
public static IWindsorContainer Configure( IWindsorContainer container, IContributeComponentModelConstruction contributor) { container = container ?? new WindsorContainer(); if (contributor != null) { container.Kernel.ComponentModelBuilder.AddContributor(contributor); } container .Install(new DbContextInstaller()) .Install(new RepositoryInstaller()) .Install(new DataServiceInstaller()) .Install(new DataComponentInstaller()); return(container); }
/// <summary> /// "To give or supply in common with others; give to a /// common fund or for a common purpose". The contributor /// should inspect the component, or even the configuration /// associated with the component, to add or change information /// in the model that can be used later. /// </summary> /// <param name = "contributor"></param> public void AddContributor(IContributeComponentModelConstruction contributor) { contributors.Add(contributor); }
/// <summary> /// Removes the specified contributor /// </summary> /// <param name = "contributor"></param> public void RemoveContributor(IContributeComponentModelConstruction contributor) { contributors.Remove(contributor); }
public void RemoveContributor(IContributeComponentModelConstruction contributor) { contributors.Remove(contributor); }
public void AddContributor(IContributeComponentModelConstruction contributor) { contributors.Add(contributor); }
public AspNetCoreFacility(IServiceCollection services) { this.services = services; this.contributor = new AspNetCoreComponentModelContributor(services); }