Exemplo n.º 1
0
        public object Any(IocScope request)
        {
            if (request.Throw)
            {
                throw new Exception("Exception requested by user");
            }

            var response = new IocScopeResponse {
                Results =
                {
                    { typeof(FunqSingletonScope).Name, FunqSingletonScope.Count },
                    { typeof(FunqRequestScope).Name,   FunqRequestScope.Count   },
                    { typeof(FunqNoneScope).Name,      FunqNoneScope.Count      },
                },
            };

            return(response);
        }
Exemplo n.º 2
0
        public object Any(IocScope request)
        {
            if (request.Throw)
            {
                throw new Exception("Exception requested by user");
            }

            var response = new IocScopeResponse
            {
                Results =
                {
                    { typeof(FunqSingletonScope).Name, FunqSingletonScope.Count },
                    { typeof(FunqRequestScope).Name,   FunqRequestScope.Count   },
                    { typeof(FunqNoneScope).Name,      FunqNoneScope.Count      },
                },
                InjectsRequest = FunqInjectRequest.Request != null
                    ? 1 + (FunqInjectRequest.SecondLevel.Request != null ? 1 : 0)
                    : 0,
            };

            return(response);
        }