static bool BinaryPredicate(NTSGeometryRef thisRef, IGeometryRef otherRef, Func <NTSGeom, NTSGeom, bool> operation) { var impl = otherRef as NTSGeometryRef; if (impl != null) { return(operation(thisRef._geom, impl._geom)); } throw new ArgumentException("Incorrect IGeometryRef implementation"); }
static IGeometryRef BinaryOperator(NTSGeometryRef thisRef, IGeometryRef otherRef, Func <NTSGeom, NTSGeom, NTSGeom> operation) { var impl = otherRef as NTSGeometryRef; if (impl != null) { var result = operation(thisRef._geom, impl._geom); return(new NTSGeometryRef(result)); } throw new ArgumentException("Incorrect IGeometryRef implementation"); }