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; }
/// <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); }