AjTalk.Language.FunctionalMethod.ExecuteNative C# (CSharp) Метод

ExecuteNative() публичный Метод

public ExecuteNative ( System.Machine machine, object self, object args ) : object
machine System.Machine
self object
args object
Результат object
        public object ExecuteNative(Machine machine, object self, object[] args)
        {
            return this.nativeFunction(machine, self, args);
        }

Usage Example

Пример #1
0
        public void CreateAndExecuteNativeFunctionalMethod()
        {
            int count = 0;
            FunctionalMethod method = new FunctionalMethod((Machine machine, object x, object[] args) => ++count);

            Assert.IsNull(method.Name);
            Assert.IsNull(method.Behavior);

            object result = method.ExecuteNative(null, null, null);

            Assert.AreEqual(1, count);
            Assert.AreEqual(1, result);
        }