示例#1
0
        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));
        }
示例#2
0
        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));
        }
示例#3
0
#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);
        }
示例#4
0
        public static bool IsLocaleAwareElementProvider(string providerName)
        {
            ILocaleAwareElementProvider elementProvider = GetElementProvider(providerName) as ILocaleAwareElementProvider;

            return(elementProvider != null);
        }