Пример #1
0
            public override IEnumerable GetData(ParameterInfo parameter)
            {
                if (Include != null)
                {
                    var list = Include.Intersect(
                        ExcludeLinqService == false ?
                        UserProviders.Select(_ => _.Name).Concat(UserProviders.Select(p => p + ".LinqService")) :
                        UserProviders.Select(_ => _.Name)).
                               ToArray();

                    return(list);
                }

                var providers = new List <string>();

                foreach (var info in Providers)
                {
                    if (info.Skip && Include == null)
                    {
                        continue;
                    }

                    if (Except != null && Except.Contains(info.Name))
                    {
                        continue;
                    }

                    if (!UserProviders.Select(_ => _.Name).Contains(info.Name))
                    {
                        continue;
                    }

                    providers.Add(info.Name);

                    if (!ExcludeLinqService)
                    {
                        providers.Add(info.Name + ".LinqService");
                    }
                }

                return(providers.ToArray());
            }