Skip to content

Commit

Permalink
Fixes Compute-302
Browse files Browse the repository at this point in the history
  • Loading branch information
andyopayne committed Jan 6, 2025
1 parent d52248b commit 60bcf94
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/compute.geometry/GeometryEndPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public static IEnumerable<GeometryEndPoint> AllEndPoints
{
foreach (var customEndpoint in customEndpoints)
{

foreach (var endpoint in GeometryEndPoint.Create(customEndpoint.Item2))
{
endpoint.UpdatePath(customEndpoint.Item1);
Expand Down Expand Up @@ -193,21 +194,24 @@ public static List<GeometryEndPoint> Create(Type t)
break;
}

// This is the general "catch all" endpoint that attempts to figure out the best routine to call
GeometryEndPoint endpoint = new GeometryEndPoint(t, overloads.ToArray());
endpoints.Add(endpoint);
if (overloads.Count > 1)
{
// This is the general "catch all" endpoint that attempts to figure out the best routine to call
GeometryEndPoint endpoint = new GeometryEndPoint(t, overloads.ToArray());
endpoints.Add(endpoint);
}

foreach (var overload in overloads)
{
// generate explicit endpoints for all overloads, even if there are no parameters (see #142)
endpoints.Add(new GeometryEndPoint(t, overload));
}

}

return endpoints;
}


protected static string PrettyString(Type t)
{
string rc = t.ToString().Replace("&", "");
Expand Down

0 comments on commit 60bcf94

Please sign in to comment.