Skip to content

Commit

Permalink
Передача в делегат значений переменных
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Rm committed Oct 10, 2023
1 parent d39c6c7 commit 36de8cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/OneScript.StandardLibrary/DelegateAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ public DelegateAction(Func<IValue[], IValue> action)

public DelegateAction(Func<BslValue[], BslValue> action)
{
_action = parameters => (IValue)action(parameters.Cast<BslValue>().ToArray());
_action = parameters => action( parameters.Select(x=>x.GetRawValue())
.Cast<BslValue>().ToArray() );
}

public override bool DynamicMethodSignatures => true;
Expand Down

0 comments on commit 36de8cd

Please sign in to comment.