public FuncMethod(FuncMethodBuilder builder) { Name = builder.Name ?? throw new ArgumentNullException(nameof(Name)); Parameters = builder.Parameters ?? new CodeParameter[0]; CodeType = builder.ReturnType; Documentation = builder.Documentation ?? throw new ArgumentNullException(nameof(Documentation)); Action = builder.Action ?? throw new ArgumentNullException(nameof(Action)); DoesReturnValue = builder.DoesReturnValue; OnCall = builder.OnCall; }
public FuncMethod(FuncMethodBuilder builder) { Name = builder.Name ?? throw new ArgumentNullException(nameof(Name)); Parameters = builder.Parameters ?? new CodeParameter[0]; CodeType = builder.ReturnType; Documentation = builder.Documentation ?? throw new ArgumentNullException(nameof(Documentation)); MethodInfo = builder?.MethodInfo ?? new MethodInfo(); _action = builder.Action ?? throw new ArgumentNullException(nameof(_action)); _onCall = builder.OnCall; }
private void Func(FuncMethodBuilder builder) { _scope.AddNativeMethod(new FuncMethod(builder)); }
private void AddFunc(FuncMethodBuilder builder) => _objectScope.AddNativeMethod(new FuncMethod(builder));