Ejemplo n.º 1
0
 // Attempts to execute fault location algorithm and processes errors if they occur.
 private double[] ExecuteFaultLocationAlgorithm(FaultLocationAlgorithm algorithm, FaultLocationDataSet faultDataSet, string parameters)
 {
     try
     {
         return(algorithm(faultDataSet, parameters));
     }
     catch (Exception ex)
     {
         OnProcessException(new Exception(string.Format("Error executing fault location algorithm: {0}", ex.Message), ex));
         return(null);
     }
 }
Ejemplo n.º 2
0
 private static bool IsMatch(FaultLocationAlgorithm algorithm1, FaultLocationAlgorithm algorithm2)
 {
     return(algorithm1.AssemblyName == algorithm2.AssemblyName &&
            algorithm1.TypeName == algorithm2.TypeName &&
            algorithm1.MethodName == algorithm2.MethodName);
 }