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;
 }
Beispiel #2
0
 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;
 }
Beispiel #3
0
 private void Func(FuncMethodBuilder builder)
 {
     _scope.AddNativeMethod(new FuncMethod(builder));
 }
Beispiel #4
0
 private void AddFunc(FuncMethodBuilder builder) => _objectScope.AddNativeMethod(new FuncMethod(builder));