예제 #1
0
        public object Execute(Ioc request)
        {
            var response = new IocResponse();

            var deps = new object[] {
                funqDepCtor, altDepCtor,
                FunqDepProperty, FunqDepDisposableProperty,
                AltDepProperty, AltDepDisposableProperty
            };

            foreach (var dep in deps)
            {
                if (dep != null)
                {
                    response.Results.Add(dep.GetType().Name);
                }
            }

            if (ThrowErrors)
            {
                throw new ArgumentException("This service has intentionally failed");
            }

            return(response);
        }
예제 #2
0
        public override void Execute(IHttpRequest req, IHttpResponse res, object requestDto)
        {
            var response = new IocResponse();

            var deps = new object[] {
                FunqDepProperty, FunqDepDisposableProperty,
                AltDepProperty, AltDepDisposableProperty
            };

            foreach (var dep in deps)
            {
                if (dep != null)
                {
                    response.Results.Add(dep.GetType().Name);
                }
            }

            req.Items["action-attr"] = response;
        }