Exemplo n.º 1
0
 public static string FromFault(W3C.Soap.Fault fault)
 {
     string msg = "Fault received:";
     if (fault.Reason != null)
         foreach (var r in fault.Reason)
             msg += r.Value;
     return msg;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Displays a fault message
        /// </summary>
        /// <param name="fault">Error raised</param>
        internal void ShowFault(W3C.Soap.Fault fault)
        {
            var error = Properties.Resources.ErrorMessage;

            if (fault.Reason != null && fault.Reason.Length > 0 && !string.IsNullOrEmpty(fault.Reason[0].Value))
            {
                error = fault.Reason[0].Value;
            }

            MessageBox.Show(
                this,
                error,
                Title,
                MessageBoxButton.OK,
                MessageBoxImage.Error);
        }