コード例 #1
0
        private void ThrowMissingInstanceProducerException(Type serviceType)
        {
            if (Helpers.IsConcreteConstructableType(serviceType))
            {
                this.ThrowNotConstructableException(serviceType);
            }

            if (serviceType.ContainsGenericParameters)
            {
                throw new ActivationException(StringResources.OpenGenericTypesCanNotBeResolved(serviceType));
            }

            throw new ActivationException(StringResources.NoRegistrationForTypeFound(serviceType));
        }
コード例 #2
0
        private void ThrowMissingInstanceProducerException(Type serviceType)
        {
            if (Helpers.IsConcreteConstructableType(serviceType))
            {
                this.ThrowNotConstructableException(serviceType);
            }

            throw new ActivationException(StringResources.NoRegistrationForTypeFound(
                                              serviceType,
                                              this.HasRegistrations,
                                              this.ContainsOneToOneRegistrationForCollectionType(serviceType),
                                              this.ContainsCollectionRegistrationFor(serviceType),
                                              this.GetNonGenericDecoratorsThatWereSkippedDuringBatchRegistration(serviceType)));
        }