Exemple #1
0
        public object Any(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);
        }
Exemple #2
0
        public override void Execute(IRequest req, IResponse 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;
        }