Skip to content

Commit

Permalink
Update SetHashFragment.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
alelom committed Dec 1, 2020
1 parent 37616a6 commit 6a6b160
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions BHoM_Engine/Modify/SetHashFragment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static partial class Modify
{
[Description("Computes the hash of the input BHoMObjects and stores it in a HashFragment for each of them." +
"\nIf the hashFragment already existed, it is replaced.")]
public static List<T> SetHashFragment<T>(this IEnumerable<T> objs, ComparisonConfig comparisonConfig = null) where T : IBHoMObject
public static IEnumerable<T> SetHashFragment<T>(this IEnumerable<T> objs, ComparisonConfig comparisonConfig = null) where T : IBHoMObject
{
// Each object will be cloned to avoid modification by reference.
List<T> objs_cloned = new List<T>();
Expand All @@ -52,7 +52,7 @@ public static List<T> SetHashFragment<T>(this IEnumerable<T> objs, ComparisonCon

[Description("Computes the hash of the BHoMObject and stores it in a HashFragment." +
"\nIf the hashFragment already existed, it is replaced.")]
public static T SetHashFragment<T>(T obj, ComparisonConfig comparisonConfig = null) where T : IBHoMObject
public static T SetHashFragment<T>(this T obj, ComparisonConfig comparisonConfig = null) where T : IBHoMObject
{
// Calculate and set the object hashes
string hash = obj.Hash(comparisonConfig);
Expand All @@ -62,7 +62,7 @@ public static T SetHashFragment<T>(T obj, ComparisonConfig comparisonConfig = nu

[Description("Clones the IBHoMObject, computes its hash and stores it in a HashFragment." +
"\nIf the hashFragment already existed, it is replaced.")]
public static T SetHashFragment<T>(T obj, string hash) where T : IBHoMObject
public static T SetHashFragment<T>(this T obj, string hash) where T : IBHoMObject
{
// Clone the current object to avoid modification by reference.
T obj_cloned = BH.Engine.Base.Query.DeepClone(obj);
Expand Down

0 comments on commit 6a6b160

Please sign in to comment.