private void LoadTypeMappings(IDictionary<Type, Type> genericTypes) { using (var ep = new CatalogExportProvider(_decoratedCatalog)) { ep.SourceProvider = ep; var locators = ep.GetExportedValues<GenericContractTypeMapping>(); foreach (var locator in locators) genericTypes.Add(locator.GenericContractTypeDefinition, locator.GenericImplementationTypeDefinition); } }
private void LoadRegistriesFromCatalog() { using (var ep = new CatalogExportProvider(this.decoratedCatalog)) { ep.SourceProvider = ep; var registries = ep.GetExportedValues<IGenericContractRegistry>(); LoadTypeMappings(registries); } }