Example #1
0
        public IExceptionHandler Assemble(IBuilderContext context, ExceptionHandlerData objectConfiguration, IConfigurationSource configurationSource, ConfigurationReflectionCache reflectionCache)
        {
            WeblogLoggingExceptionHandlerData castedObjectConfiguration = (WeblogLoggingExceptionHandlerData)objectConfiguration;
            WeblogLoggingExceptionHandler     createdObject             = new WeblogLoggingExceptionHandler(castedObjectConfiguration.LogCategory, new LoggerWrapper());

            return(createdObject);
        }
        public void CreatePolicies(IPolicyList policyList, string instanceName, ConfigurationElement configurationObject, IConfigurationSource configurationSource)
        {
            WeblogLoggingExceptionHandlerData castConfigurationObject = (WeblogLoggingExceptionHandlerData)configurationObject;

            new PolicyBuilder <WeblogLoggingExceptionHandler, WeblogLoggingExceptionHandlerData>(NamedTypeBuildKey.Make <WeblogLoggingExceptionHandler>(instanceName), castConfigurationObject, c => new WeblogLoggingExceptionHandler(castConfigurationObject.LogCategory, new LoggerWrapper())).AddPoliciesToPolicyList(policyList);
        }