Exemple #1
0
        /// <summary>
        /// Builds a WSTrust fault exception using the information in the specified exception.
        /// </summary>
        /// <param name="ex">The exception to wrap in a <see cref="WSTrustFaultException"/>.</param>
        /// <returns></returns>
        public static WSTrustFaultException FromException(Exception ex)
        {
            WSTrustFaultException faultException = ex as WSTrustFaultException;

            if (faultException == null)
            {
                faultException = new RequestFailedFaultException(ex);
            }

            return(faultException);
        }
        /// <summary>
        /// Builds a WSTrust fault exception using the information in the specified exception. 
        /// </summary>
        /// <param name="ex">The exception to wrap in a <see cref="WSTrustFaultException"/>.</param>
        /// <returns></returns>
        public static WSTrustFaultException FromException( Exception ex )
        {
            WSTrustFaultException faultException = ex as WSTrustFaultException;

            if ( faultException == null )
            {
                faultException = new RequestFailedFaultException( ex );
            }

            return faultException;
        }