public static IEnumerable <Element> GetForeignRoots(string providerName, SearchToken seachToken) { Verify.ArgumentNotNullOrEmpty(providerName, nameof(providerName)); ILocaleAwareElementProvider provider = GetElementProvider(providerName) as ILocaleAwareElementProvider; if (provider == null) { throw new ArgumentException($"The Element Provider identified by the specified provider name does not implement {typeof(ILocaleAwareElementProvider)}"); } return(provider.GetForeignRoots(seachToken)); }
public static IEnumerable <Element> GetForeignRoots(string providerName, SearchToken seachToken) { if (string.IsNullOrEmpty(providerName)) { throw new ArgumentNullException("providerName"); } ILocaleAwareElementProvider provider = GetElementProvider(providerName) as ILocaleAwareElementProvider; if (provider == null) { throw new ArgumentException(string.Format("The Element Provider identified by the specified provider name does not implement {0}", typeof(ILocaleAwareElementProvider))); } return(provider.GetForeignRoots(seachToken)); }