Update AutomateFunction.cs
build and deploy Speckle functions / publish-automate-function-version (push) Has been cancelled
build and deploy Speckle functions / publish-automate-function-version (push) Has been cancelled
This commit is contained in:
@@ -118,22 +118,20 @@ static class AutomateFunction
|
||||
{
|
||||
if (releaseObjectPropDict.ContainsKey(entry.Key))
|
||||
{
|
||||
bool changed = false;
|
||||
try
|
||||
{
|
||||
changed = entry.Value != releaseObjectPropDict[entry.Key];
|
||||
}
|
||||
catch { }
|
||||
if (changed)
|
||||
{
|
||||
string diff =
|
||||
$"Property ({entry.Key}) changed from ({releaseObjectPropDict[entry.Key]}) to ({entry.Value})";
|
||||
if (!diffDictionary.ContainsKey(entry.Key))
|
||||
bool changed = !Equals(entry.Value, releaseObjectPropDict[entry.Key]);
|
||||
if (changed)
|
||||
{
|
||||
diffDictionary.Add(entry.Key, diff);
|
||||
string diff =
|
||||
$"Property ({entry.Key}) changed from ({releaseObjectPropDict[entry.Key]}) to ({entry.Value})";
|
||||
if (!diffDictionary.ContainsKey(entry.Key))
|
||||
{
|
||||
diffDictionary.Add(entry.Key, diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
catch { }
|
||||
releaseObjectPropDict.Remove(entry.Key);
|
||||
}
|
||||
else
|
||||
@@ -206,4 +204,9 @@ static class AutomateFunction
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public static bool Equals<T>(T a, T b)
|
||||
{
|
||||
return EqualityComparer<T>.Default.Equals(a, b);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user