Esempio n. 1
0
        protected override object CreateBehavior()
        {
            Type errorHandler = null;

            if (!string.IsNullOrEmpty(ErrorHandlerType))
            {
                try
                {
                    errorHandler = ErrorHandlerType.GetType <IErrorHandler>();
                }
                catch (Exception e)
                {
                    throw new Exception(string.Format("Invalid errorHandlerType specified in errorHandler behavior element. {0}", e));
                }
            }

            return(new ErrorHandlerBehavior(
                       errorHandler,
                       UnhandledErrorMessage,
                       ReturnRawException));
        }
 /// <summary>
 /// Constructor that receives the Error Handler Type as an argument
 /// </summary>
 /// <param name="errorHandlerType">Error Handler Type</param>
 public ErrorHandlerEndpointBehavior(ErrorHandlerType errorHandlerType)
 {
     this.errorHandlerType = errorHandlerType;
 }