DartSharp.Language.FuncMethod.Call C# (CSharp) Méthode

Call() public méthode

public Call ( object self, Context context, object arguments ) : object
self object
context Context
arguments object
Résultat object
        public object Call(object self, Context context, object[] arguments)
        {
            return this.func(self, context, arguments);
        }

Usage Example

Exemple #1
0
 public void DefineAndCallFuncMethod()
 {
     IMethod method = new FuncMethod(null, (obj, context, args) => ((string)obj).Length);
     Assert.IsNull(method.Type);
     Assert.AreEqual(3, method.Call("foo", null, null));
 }