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