internal static void TryLogConfigurationFailure(ActivationException configurationException) { try { var logger = EnterpriseLibraryContainer.Current.GetInstance <DefaultLoggingEventLogger>(); logger.LogConfigurationError(configurationException); } catch { } }
private static void TryLogConfigurationError(ActivationException configurationException, string instanceName) { try { DefaultSecurityEventLogger eventLogger = EnterpriseLibraryContainer.Current.GetInstance <DefaultSecurityEventLogger>(); if (eventLogger != null) { eventLogger.LogConfigurationError(instanceName, Resources.ErrorAuthorizationConfigurationFailedMessage, configurationException); } } catch { } }
private static void TryLogConfigurationError(ActivationException configurationException, string instanceName) { try { DefaultCachingEventLogger eventLogger = EnterpriseLibraryContainer.Current.GetInstance <DefaultCachingEventLogger>(); if (eventLogger != null) { eventLogger.LogConfigurationError(instanceName, configurationException); } } catch { } }
private object TryGetObjectFromKernel(Type typeToBeCreated, IKernel kernel) { Object result = null; try { result = kernel.Get(typeToBeCreated); } catch (ActivationException ex) { activationException = ex; } return(result); }
public IoCDependencyInjectionNotFoundException(ActivationException innerException) : base("Dependency injection for " + typeof(T) + " not found", innerException) { }
Assert_ExceptionContainsInfoAboutManualCollectionRegistrationMixedDecoratorsThatTakeAFunc( ActivationException ex) { AssertThat.StringContains(string.Format( "impossible for the container to generate a {0} for injection into the {1} decorator", typeof(Func<ICommandHandler<RealCommand>>).ToFriendlyName(), typeof(AsyncCommandHandlerProxy<>).ToFriendlyName()), ex.Message); AssertThat.StringContains( "the registration hasn't been made using one of the RegisterCollection overloads that take " + "a list of System.Type", ex.Message); AssertThat.StringContains( "switch to one of the other RegisterCollection overloads, or don't use a decorator that " + "depends on a Func<T>", ex.Message); }
internal static void ThrowExn(ActivationException err) { throw WrapExn(err); }
internal static DependencyException WrapExn(ActivationException err) { return(new DependencyException(err.Message, err)); }