Esempio n. 1
0
        public void TestRecursionWrong()
        {
            Except.Test(tracer);
            var actual   = tracer.GetTraceResult().Theards[Thread.CurrentThread.ManagedThreadId].Methods[0];
            var expected = new MethodTraceResult();

            expected.MethodName      = "Test";
            expected.MethodClassName = "Except";
            expected.Methods.Add(new MethodTraceResult());
            expected.Methods[0].MethodClassName = "RecursionTest";
            expected.Methods[0].MethodName      = "Test";

            try
            {
                CheckAreEqual(expected, actual);
                CheckAreEqual(expected.Methods[0], actual.Methods[0]);
                logger.Info(nameof(TestRecursionWrong) + " - passed");
            }
            catch (Exception e)
            {
                logger.Error(e, nameof(TestRecursionWrong) + " - failed");
            }
        }
Esempio n. 2
0
            public override IEnumerable GetData(ParameterInfo parameter)
            {
                if (Include != null)
                {
                    var list = Include.Intersect(
                        IncludeLinqService ?
                        UserProviders.Concat(UserProviders.Select(p => p + ".LinqService")) :
                        UserProviders).
                               ToArray();

                    return(list);
                }

                var providers = new List <string>();

                foreach (var providerName in Providers)
                {
                    if (Except != null && Except.Contains(providerName))
                    {
                        continue;
                    }

                    if (!UserProviders.Contains(providerName))
                    {
                        continue;
                    }

                    providers.Add(providerName);

                    if (IncludeLinqService && !ExcludeLinqService)
                    {
                        providers.Add(providerName + ".LinqService");
                    }
                }

                return(providers.ToArray());
            }