Skip to content

Commit

Permalink
Merge pull request #1362 from Mr-Rm/develop
Browse files Browse the repository at this point in the history
v2: Передача в делегат (объект `Действие`) значений переменных
  • Loading branch information
EvilBeaver authored Oct 10, 2023
2 parents d39c6c7 + 36de8cd commit 5f6ef53
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 5f6ef53

Please sign in to comment.