/// <summary>Checks the tracker and throws UserCancelException if tracker is not null and progress returns false</summary>
 /// <param name="tracker">can be null, then the method does nothing.</param>
 public static void CheckAndThrow(com.epl.geometry.ProgressTracker tracker)
 {
     if (tracker != null && !tracker.Progress(-1, -1))
     {
         throw new com.epl.geometry.UserCancelException();
     }
 }
Ejemplo n.º 2
0
 public override com.epl.geometry.Geometry Next()
 {
     com.epl.geometry.Geometry geometry;
     if ((geometry = m_inputGeometryCursor.Next()) != null)
     {
         // if (geometry =
         // m_inputGeometryCursor->Next())
         m_index = m_inputGeometryCursor.GetGeometryID();
         if ((m_progressTracker != null) && !(m_progressTracker.Progress(-1, -1)))
         {
             throw new System.Exception("user_canceled");
         }
         return(Simplify(geometry));
     }
     return(null);
 }