Skip to content

Commit

Permalink
Name change to HasMergeablePropertiesWith
Browse files Browse the repository at this point in the history
  • Loading branch information
kThorsager authored and IsakNaslundBh committed Apr 15, 2020
1 parent 6d452a6 commit 9b2e0a0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ public static partial class Query
[Input("element", "An IElement0D to compare the properties of with an other IElement0D.")]
[Input("other", "The IElement0D to compare with the other IElement0D.")]
[Output("equal", "True if the Objects non-geometrical property is equal to the point that they could be merged into one object.")]
public static bool IHaveMergeableProperties(this IElement0D element, IElement0D other)
public static bool IHasMergeablePropertiesWith(this IElement0D element, IElement0D other)
{
return HaveMergeablePropertiesIElement(element, other);
return HasMergeablePropertiesWithIElement(element, other);
}

/******************************************/
Expand All @@ -49,9 +49,9 @@ public static bool IHaveMergeableProperties(this IElement0D element, IElement0D
[Input("element", "An IElement1D to compare the properties of with an other IElement1D.")]
[Input("other", "The IElement1D to compare with the other IElement1D.")]
[Output("equal", "True if the Objects non-geometrical property is equal to the point that they could be merged into one object.")]
public static bool IHaveMergeableProperties(this IElement1D element, IElement1D other)
public static bool IHasMergeablePropertiesWith(this IElement1D element, IElement1D other)
{
return HaveMergeablePropertiesIElement(element, other);
return HasMergeablePropertiesWithIElement(element, other);
}

/******************************************/
Expand All @@ -60,17 +60,17 @@ public static bool IHaveMergeableProperties(this IElement1D element, IElement1D
[Input("element", "An IElement2D to compare the properties of with an other IElement2D.")]
[Input("other", "The IElement2D to compare with the other IElement2D.")]
[Output("equal", "True if the Objects non-geometrical property is equal to the point that they could be merged into one object.")]
public static bool IHaveMergeableProperties(this IElement2D element, IElement2D other)
public static bool IHasMergeablePropertiesWith(this IElement2D element, IElement2D other)
{
return HaveMergeablePropertiesIElement(element, other);
return HasMergeablePropertiesWithIElement(element, other);
}


/******************************************/
/**** Private Methods ****/
/******************************************/

private static bool HaveMergeablePropertiesIElement(this IElement element, IElement other)
private static bool HasMergeablePropertiesWithIElement(this IElement element, IElement other)
{
// Geometrical objects don't have properties
if (typeof(IGeometry).IsAssignableFrom(element.GetType()) && typeof(IGeometry).IsAssignableFrom(other.GetType()))
Expand All @@ -81,7 +81,7 @@ private static bool HaveMergeablePropertiesIElement(this IElement element, IElem
return false;

// look for a specific comparing method
object result = Reflection.Compute.RunExtensionMethod(element, "HaveMergeableProperties", new object[] { other });
object result = Reflection.Compute.RunExtensionMethod(element, "HasMergeablePropertiesWith", new object[] { other });

if (result == null || !result.GetType().IsAssignableFrom(typeof(bool)))
{
Expand Down
2 changes: 1 addition & 1 deletion Spatial_Engine/Spatial_Engine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Compute\DistributeOutlines.cs" />
<Compile Include="Query\HaveMergeableProperties.cs" />
<Compile Include="Query\HasMergeablePropertiesWith.cs" />
<Compile Include="Query\InternalOutlineCurves.cs" />
<Compile Include="Create\NewElement0D.cs" />
<Compile Include="Create\NewElement1D.cs" />
Expand Down

0 comments on commit 9b2e0a0

Please sign in to comment.