Jurassic.Library.MapInstance.__STUB__ForEach C# (CSharp) Метод

__STUB__ForEach() приватный статический Метод

private static __STUB__ForEach ( ScriptEngine engine, object thisObj, object args ) : object
engine ScriptEngine
thisObj object
args object
Результат object
        private static object __STUB__ForEach(ScriptEngine engine, object thisObj, object[] args)
        {
            thisObj = TypeConverter.ToObject(engine, thisObj);
            if (!(thisObj is MapInstance))
                throw new JavaScriptException(engine, ErrorType.TypeError, "The method 'forEach' is not generic.");
            switch (args.Length)
            {
                case 0:
                    throw new JavaScriptException(engine, ErrorType.TypeError, "undefined cannot be converted to an object");
                case 1:
                    ((MapInstance)thisObj).ForEach(TypeConverter.ToObject<FunctionInstance>(engine, args[0]), Undefined.Value); return Undefined.Value;
                default:
                    ((MapInstance)thisObj).ForEach(TypeConverter.ToObject<FunctionInstance>(engine, args[0]), args[1]); return Undefined.Value;
            }
        }