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)); }
#pragma warning restore 612 public static bool ContainsLocalizedData(string providerName) { 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.ContainsLocalizedData); }
public static bool IsLocaleAwareElementProvider(string providerName) { ILocaleAwareElementProvider elementProvider = GetElementProvider(providerName) as ILocaleAwareElementProvider; return(elementProvider != null); }