Esempio n. 1
0
 public static T ObtenerResultado <T>(IOperationResult <T> result)
 {
     if (result.HasNoException)
     {
         return(result.Value);
     }
     if (result.HasFaultExceptionOfType <Exception>())
     {
         throw new Exception(ObtenerMensajeError(result));                                              //FaultException(Type)
     }
     if (result.HasFaultException)
     {
         throw new Exception(); //Exception FaultException
     }
     throw new Exception("");   //Exception Generica
 }
Esempio n. 2
0
 public static void FinalizarResultado(IOperationResult result)
 {
     if (result.HasNoException)
     {
         return;
     }
     if (result.HasFaultExceptionOfType <Exception>())
     {
         throw new Exception(ObtenerMensajeError(result));                                              //FaultException(Type)
     }
     if (result.HasFaultException)
     {
         throw new Exception(); //Exception FaultException
     }
     throw new Exception("");   //Exception Generica
 }