Esempio n. 1
0
        /// <summary>
        /// <para>Initializes the provider with a <see cref="ExceptionHandlingConfigurationView"/>.</para>
        /// </summary>
        /// <param name="configurationView">
        /// <para>A <see cref="ExceptionHandlingConfigurationView"/> object.</para>
        /// </param>
        public override void Initialize(ConfigurationView configurationView)
        {
            ArgumentValidation.CheckForNullReference(configurationView, "configurationView");
            ArgumentValidation.CheckExpectedType(configurationView, typeof(ExceptionHandlingConfigurationView));

            ExceptionHandlingConfigurationView exceptionHandlingConfigurationView = (ExceptionHandlingConfigurationView)configurationView;
            ExceptionHandlerData exceptionHandlerData = exceptionHandlingConfigurationView.GetExceptionHandlerData(CurrentPolicyName, CurrentExceptionTypeName, ConfigurationName);

            ArgumentValidation.CheckExpectedType(exceptionHandlerData, typeof(ReplaceHandlerData));

            replaceHandlerData = (ReplaceHandlerData)exceptionHandlerData;
        }
        private ExceptionHandlerData GetExceptionHandlerData(string handlerName)
        {
            ExceptionHandlingConfigurationView exceptionHandlingConfigurationView = (ExceptionHandlingConfigurationView)CreateConfigurationView();

            return(exceptionHandlingConfigurationView.GetExceptionHandlerData(policyName, exceptionTypeName, handlerName));
        }