Exemple #1
0
        public static Exception RedundantParametersProvided(InjectionContext context)
        {
            var description = context.ObjectDescription;

            return(new ArgumentException(
                       ExceptionFormatter.Format(context, Resources.RedundantParametersProvided,
                                                 description.ConcreteType.ToFullTypeName())));
        }
Exemple #2
0
        public static Exception ParameterNumberExceeds(InjectionContext context, int neededParamNumber, int providedParamNumber)
        {
            var description = context.ObjectDescription;

            return(new ArgumentException(
                       ExceptionFormatter.Format(context, Resources.ParameterNumberExceeds,
                                                 description.ConcreteType.ToFullTypeName(),
                                                 neededParamNumber,
                                                 providedParamNumber)));
        }
Exemple #3
0
        public static Exception NonautowirableParameterNotSpecified(InjectionContext context, DependencyProvider dependencyProvider, int index)
        {
            var description = context.ObjectDescription;

            return(new ArgumentException(
                       ExceptionFormatter.Format(context,
                                                 Resources.NonautowirableParameterNotSpecified,
                                                 index,
                                                 description.ConcreteType.ToFullTypeName(),
                                                 dependencyProvider.TargetType)));
        }