Beispiel #1
0
        public static ProviderGroupMatchResult GetProviderGroupByType(this IHiveManager manager, Type type)
        {
            var attrib = RepositoryTypeAttribute.GetFrom(type);

            if (attrib == null)
            {
                throw new InvalidOperationException("In order to load a provider group by RepositoryType, the supplied type must be decorated with a RepositoryTypeAttribute");
            }
            Uri providerGroupRoot = attrib.ProviderGroupRoot;

            return(manager.GetFirstGroupOrThrow(providerGroupRoot));
        }
Beispiel #2
0
 public static ProviderGroupMatchResult GetProviderGroup(this IHiveManager manager, Uri customMappingRoot)
 {
     return(manager.GetFirstGroupOrThrow(customMappingRoot));
 }