示例#1
0
        public ServiceActor Resolve(Type serviceType)
        {
            if (serviceType == null)
            {
                throw new ArgumentNullException("serviceType");
            }

            var services = _retriever.Retrieve(serviceType);

            return(_defaultStrategy.Select(services));
        }
示例#2
0
        public ServiceActor Resolve(Type serviceType, IServiceLoadBalancingStrategy strategy)
        {
            if (serviceType == null)
            {
                throw new ArgumentNullException("serviceType");
            }
            if (strategy == null)
            {
                throw new ArgumentNullException("strategy");
            }

            var services = _retriever.Retrieve(serviceType);

            return(strategy.Select(services));
        }