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

            return(new ArgumentException(
                       ExceptionFormatter.Format(context, Resources.RedundantParametersProvided,
                                                 description.ConcreteType.ToFullTypeName())));
        }
예제 #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)));
        }
예제 #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)));
        }