コード例 #1
0
ファイル: Container.cs プロジェクト: Tony-Zhang03/Funq
        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)));
        }
コード例 #2
0
 /// <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))
 {
 }
コード例 #3
0
 /// <summary>
 /// Initializes the exception with the service that could not be resolved.
 /// </summary>
 public ResolutionException(Type missingServiceType)
     : base(FunqResources.ResolutionException_MissingType(missingServiceType.FullName))
 {
 }
コード例 #4
0
ファイル: Container.cs プロジェクト: Tony-Zhang03/Funq
        /* 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));
        }