private Exception CreateAdapterException <TService>(Exception ex) { if (Adapter == null) { return(ex); } return(new ResolutionException( FunqResources.ResolutionException_Adapter(typeof(TService).FullName, Adapter.GetType().FullName, ex.Message))); }
/// <summary> /// Initializes the exception with the service (and its name) that could not be resolved. /// </summary> public ResolutionException(Type missingServiceType, string missingServiceName) : base(FunqResources.ResolutionException_MissingNamedType(missingServiceType.FullName, missingServiceName)) { }
/// <summary> /// Initializes the exception with the service that could not be resolved. /// </summary> public ResolutionException(Type missingServiceType) : base(FunqResources.ResolutionException_MissingType(missingServiceType.FullName)) { }
/* All ResolveImpl are essentially equal, except for the type of the factory * which is "hardcoded" in each implementation. This slight repetition of * code gives us a bit more of perf. gain by avoiding an intermediate * func/lambda to call in a generic way as we did before. */ private Exception CreateResolveException <TService>(Exception ex) { return(new Exception(FunqResources.ResolutionException_Autowired(typeof(TService).FullName), ex)); }