/// <summary>
 /// Initializes a new instance of the <see cref="ConstructorArgumentsMismatchException"/> class.
 /// </summary>
 /// <param name="message">
 /// The message.
 /// </param>
 /// <param name="typedFactoryType">
 /// The type of the factory interface.
 /// </param>
 /// <param name="nonMatchingParameters">
 /// The list of non-matching parameters.
 /// </param>
 /// <param name="innerException">
 /// The inner exception, documenting the resolution failure.
 /// </param>
 public ConstructorArgumentsMismatchException(string message,
                                              Type typedFactoryType,
                                              ParameterInfo[] nonMatchingParameters,
                                              ResolutionFailedException innerException)
     : base(message, innerException)
 {
     this.TypedFactoryType = typedFactoryType;
     this.NonMatchingParameters = nonMatchingParameters;
 }
 private static ActivationException ErrorResolutionFailed(ResolutionFailedException inner)
 {
     string message = string.Format("Instance resolution failed. Type={0}, Name='{1}'.", inner.TypeRequested, inner.NameRequested);
     return new ActivationException(message, inner);
 }