JavaScriptEngineSwitcher.ChakraCore.JsRt.JsValue.CallFunction C# (CSharp) Метод

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

Invokes a function
Requires an active script context.
public CallFunction ( ) : JsValue
Результат JsValue
		public JsValue CallFunction(params JsValue[] arguments)
		{
			JsValue returnReference;

			if (arguments.Length > ushort.MaxValue)
			{
				throw new ArgumentOutOfRangeException("arguments");
			}

			JsErrorHelpers.ThrowIfError(NativeMethods.JsCallFunction(this, arguments, (ushort)arguments.Length, out returnReference));

			return returnReference;
		}

Usage Example

Пример #1
0
        private static void FreezeObject(JsValue objValue)
        {
            JsValue freezeMethodValue = JsValue.GlobalObject
                                        .GetProperty("Object")
                                        .GetProperty("freeze")
            ;

            freezeMethodValue.CallFunction(objValue);
        }