Asgard.ScriptSystem.Javascript.Modules.AsgardModule.SetProperty C# (CSharp) Method

SetProperty() protected method

protected SetProperty ( JSValue name, JSValue value, PropertyScope propertyScope, bool throwOnError ) : void
name JSValue
value JSValue
propertyScope PropertyScope
throwOnError bool
return void
        protected override void SetProperty(JSValue name, JSValue value, PropertyScope propertyScope, bool throwOnError)
        {
            if (name.ToString() == "OnTick")
            {
                OnTick += (d) =>
                {
                    var arg = new Arguments();
                    arg.Add(Marshal(d));
                    var func = (value.Value as NiL.JS.BaseLibrary.Function);
                    func.Call(arg);
                };
                return;
            }

            base.SetProperty(name, value, propertyScope, throwOnError);
        }