using System;
using System.Collections.Generic;
using System.Text;
namespace ToRemObjects
{
public class RemObjectsConsole
{
public RemObjectsConsole()
{ }
public object propObject
{
get { return 1.2D; }
set { Console.WriteLine("propObject:{0}", value); }
}
public void writeObject(object value)
{
Console.WriteLine("writeObject:{0}", value);
}
}
class Program
{
static void Main(string[] args)
{
using (var esc = new RemObjects.Script.EcmaScriptComponent())
{
esc.Include("test1", @"
function testPropObject(cc) {
cc.propObject = undefined;// result to null
cc.writeObject(undefined);// result to null
cc.writeObject();// result to null
}
");
RemObjectsConsole cc = new RemObjectsConsole();
var o = esc.RunFunction("testPropObject", cc);
Console.ReadLine();
}
}
}
Yes, I understand that, but this will allow you to understand how is called method,
when you have string as type of parameter you pass null but this can’t be mark for parameter less call,
When I have general type as object I always need to check what I receive from script engine, I can receive anything from it (EcmaScriptObject, EcmaScriptArrayObject and etc)
Yes, I now it, test it against version 2.0.65.1067 and you can see
how method writeObject receive instance of RemObjects.Script.EcmaScript.Undefined,
but now that functionality is missing