/// <summary>Find all domains that have value sets for the supplied version and register their matching MB interfaces against a database code resolver. /// </summary> /// <remarks>Find all domains that have value sets for the supplied version and register their matching MB interfaces against a database code resolver. /// </remarks> /// <param name="dao">the code set DAO</param> /// <param name="codeFactory">a code factory</param> /// <param name="version">the value set version being used</param> /// <param name="registry">a code resolver registry</param> /// <param name="releaseSpecificBasePackageName">base package name for the specific API release being targeted</param> /// <returns>the results of the registration process</returns> public virtual DatabaseCodeResolverRegistrationUtilityResults RegisterAll(CodeSetDao dao, TypedCodeFactory codeFactory, string version, GenericCodeResolverRegistry registry, string releaseSpecificBasePackageName) { DatabaseCodeResolverRegistrationUtilityResults results = new DatabaseCodeResolverRegistrationUtilityResults (this); ICollection <string> domainTypes = DetermineAllDomains(dao, version); IList <Type> domainInterfaces = FindAllMatchingDomainInterfaces(domainTypes, releaseSpecificBasePackageName, results); RegisterDomainsAgainstDatabaseCodeResolver(dao, codeFactory, version, registry, domainInterfaces); return(results); }
/// <summary>Find all domain interfaces that match the supplied domain types.</summary> /// <remarks>Find all domain interfaces that match the supplied domain types.</remarks> /// <param name="domainTypes">the domain types to match against interfaces</param> /// <param name="releaseSpecificBasePackageName">base package name for the specific API release being targeted</param> /// <param name="results">results object detailing what domains were registered and which could not be matched up to interfaces /// </param> /// <returns>the matching interfaces</returns> private IList <Type> FindAllMatchingDomainInterfaces(ICollection <string> domainTypes, string releaseSpecificBasePackageName , DatabaseCodeResolverRegistrationUtilityResults results) { // for each VocabularyDomain type, look for a matching interface IList <Type> domainInterfaces = new List <Type>(); foreach (string domainType in domainTypes) { Type domainInterface = LookupDomainInterface(domainType, releaseSpecificBasePackageName); if (domainInterface != null) { domainInterfaces.Add(domainInterface); results.domainsInDatabaseMappedToInterfacesUsedToRegister[domainType] = domainInterface; } else { // need to log a problem results.domainsFoundInDatabaseButNoMatchingInterface.Add(domainType); } } return(domainInterfaces); }