Пример #1
0
        public IEnumerable<ServiceReference> FindServices(Type serviceType)
        {
            IEnumerable<ServiceReference> iterable;
            if (!this.services.TryGetValue(serviceType, out iterable))
            {
                var finder = new ServiceReferencesFinder
                                 {
                                         Type = serviceType
                                 };

                this.owner.VisitModules(finder);
                iterable = finder.Services;
                this.services.Add(serviceType, iterable);
            }

            return iterable;
        }
Пример #2
0
        public IEnumerable <ServiceReference> FindServices(Type serviceType)
        {
            IEnumerable <ServiceReference> iterable;

            if (!this.services.TryGetValue(serviceType, out iterable))
            {
                var finder = new ServiceReferencesFinder
                {
                    Type = serviceType
                };

                this.owner.VisitModules(finder);
                iterable = finder.Services;
                this.services.Add(serviceType, iterable);
            }

            return(iterable);
        }