Skip to content

Commit

Permalink
#270 - Add support for "&" ByRef types in Caller
Browse files Browse the repository at this point in the history
  • Loading branch information
alelom authored and rwemay committed Jun 2, 2020
1 parent a99ebd0 commit 996464f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion BHoM_UI/Templates/Caller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ protected virtual Func<DataAccessor, object, bool> CreateOutputAccessor(Type dat
{
UnderlyingType subType = dataType.UnderlyingType();
string methodName = (subType.Depth == 0) ? "SetDataItem" : (subType.Depth == 1) ? "SetDataList" : "SetDataTree";
MethodInfo method = DataAccessor.GetType().GetMethod(methodName).MakeGenericMethod(subType.Type);
MethodInfo method = DataAccessor.GetType().GetMethod(methodName).MakeGenericMethod(subType.Type.IsByRef ? subType.Type.GetElementType() : subType.Type);

ParameterExpression lambdaInput1 = Expression.Parameter(typeof(DataAccessor), "accessor");
ParameterExpression lambdaInput2 = Expression.Parameter(typeof(object), "data");
Expand Down Expand Up @@ -637,6 +637,7 @@ protected void UpdateInputGenericType(int index)
private static bool m_UpgradeMessageShown = false;

/*************************************/

}
}

0 comments on commit 996464f

Please sign in to comment.