public void getResults(int cursor, IFieldGetter rslt, Object[] buf) { switch (cursor) { case 0: ((String[])buf[0])[0] = rslt.getVarchar(1); ((bool[])buf[1])[0] = rslt.wasNull(1); ((short[])buf[2])[0] = rslt.getShort(2); ((bool[])buf[3])[0] = rslt.wasNull(2); ((long[])buf[4])[0] = rslt.getLong(3); return; case 2: ((short[])buf[0])[0] = rslt.getShort(1); ((bool[])buf[1])[0] = rslt.wasNull(1); ((long[])buf[2])[0] = rslt.getLong(2); ((String[])buf[3])[0] = rslt.getVarchar(3); ((bool[])buf[4])[0] = rslt.wasNull(3); ((String[])buf[5])[0] = rslt.getVarchar(4); ((bool[])buf[6])[0] = rslt.wasNull(4); ((long[])buf[7])[0] = rslt.getLong(5); return; } }
public void getResults(int cursor, IFieldGetter rslt, Object[] buf) { switch (cursor) { case 0: ((Guid[])buf[0])[0] = rslt.getGuid(1); ((String[])buf[1])[0] = rslt.getVarchar(2); return; case 1: ((Guid[])buf[0])[0] = rslt.getGuid(1); ((String[])buf[1])[0] = rslt.getVarchar(2); return; case 2: ((Guid[])buf[0])[0] = rslt.getGuid(1); ((String[])buf[1])[0] = rslt.getVarchar(2); return; case 3: ((Guid[])buf[0])[0] = rslt.getGuid(1); ((String[])buf[1])[0] = rslt.getVarchar(2); return; case 6: ((Guid[])buf[0])[0] = rslt.getGuid(1); ((String[])buf[1])[0] = rslt.getVarchar(2); return; } }
public void getResults(int cursor, IFieldGetter rslt, Object[] buf) { switch (cursor) { case 0: ((String[])buf[0])[0] = rslt.getVarchar(1); ((bool[])buf[1])[0] = rslt.wasNull(1); ((long[])buf[2])[0] = rslt.getLong(2); ((bool[])buf[3])[0] = rslt.wasNull(2); ((String[])buf[4])[0] = rslt.getVarchar(3); ((bool[])buf[5])[0] = rslt.wasNull(3); ((short[])buf[6])[0] = rslt.getShort(4); ((bool[])buf[7])[0] = rslt.wasNull(4); ((short[])buf[8])[0] = rslt.getShort(5); ((bool[])buf[9])[0] = rslt.wasNull(5); ((short[])buf[10])[0] = rslt.getShort(6); ((bool[])buf[11])[0] = rslt.wasNull(6); ((short[])buf[12])[0] = rslt.getShort(7); ((bool[])buf[13])[0] = rslt.wasNull(7); ((String[])buf[14])[0] = rslt.getVarchar(8); ((bool[])buf[15])[0] = rslt.wasNull(8); ((String[])buf[16])[0] = rslt.getVarchar(9); ((bool[])buf[17])[0] = rslt.wasNull(9); ((long[])buf[18])[0] = rslt.getLong(10); ((DateTime[])buf[19])[0] = rslt.getGXDateTime(11); ((bool[])buf[20])[0] = rslt.wasNull(11); return; } }
public void getResults(int cursor, IFieldGetter rslt, Object[] buf) { switch (cursor) { case 0: ((int[])buf[0])[0] = rslt.getInt(1); return; case 1: ((String[])buf[0])[0] = rslt.getString(1, 255); return; case 2: ((String[])buf[0])[0] = rslt.getString(1, 255); return; case 3: ((String[])buf[0])[0] = rslt.getVarchar(1); ((String[])buf[1])[0] = rslt.getVarchar(2); ((String[])buf[2])[0] = rslt.getVarchar(3); return; } }
public void getResults(int cursor, IFieldGetter rslt, Object[] buf) { switch (cursor) { case 0: ((short[])buf[0])[0] = rslt.getShort(1); ((long[])buf[1])[0] = rslt.getLong(2); ((decimal[])buf[2])[0] = rslt.getDecimal(3); ((short[])buf[3])[0] = rslt.getShort(4); break; case 1: ((short[])buf[0])[0] = rslt.getShort(1); ((long[])buf[1])[0] = rslt.getLong(2); ((decimal[])buf[2])[0] = rslt.getDecimal(3); ((short[])buf[3])[0] = rslt.getShort(4); break; case 2: ((short[])buf[0])[0] = rslt.getShort(1); ((long[])buf[1])[0] = rslt.getLong(2); ((decimal[])buf[2])[0] = rslt.getDecimal(3); ((short[])buf[3])[0] = rslt.getShort(4); break; case 3: ((short[])buf[0])[0] = rslt.getShort(1); ((long[])buf[1])[0] = rslt.getLong(2); ((decimal[])buf[2])[0] = rslt.getDecimal(3); ((short[])buf[3])[0] = rslt.getShort(4); break; } }
public JsClr(IJintVisitor visitor) { this.global = visitor.Global; this.propertyGetter = visitor.PropertyGetter; this.methodGetter = visitor.MethodGetter; this.fieldGetter = visitor.FieldGetter; value = null; }
public void getResults(int cursor, IFieldGetter rslt, Object[] buf) { switch (cursor) { } }
public JsClr(IJintVisitor visitor) { _global = visitor.Global; _propertyGetter = visitor.PropertyGetter; _fieldGetter = visitor.FieldGetter; _entityAccessor = visitor.EntityAccessor; value = null; }
public void getResults(int cursor, IFieldGetter rslt, Object[] buf) { switch (cursor) { case 1: ((long[])buf[0])[0] = rslt.getLong(1); ((bool[])buf[1])[0] = rslt.wasNull(1); ((long[])buf[2])[0] = rslt.getLong(2); ((long[])buf[3])[0] = rslt.getLong(3); return; case 4: ((long[])buf[0])[0] = rslt.getLong(1); ((long[])buf[1])[0] = rslt.getLong(2); ((bool[])buf[2])[0] = rslt.wasNull(2); ((long[])buf[3])[0] = rslt.getLong(3); return; case 6: ((long[])buf[0])[0] = rslt.getLong(1); ((long[])buf[1])[0] = rslt.getLong(2); ((bool[])buf[2])[0] = rslt.wasNull(2); ((long[])buf[3])[0] = rslt.getLong(3); return; case 13: ((long[])buf[0])[0] = rslt.getLong(1); ((long[])buf[1])[0] = rslt.getLong(2); return; case 14: ((long[])buf[0])[0] = rslt.getLong(1); ((bool[])buf[1])[0] = rslt.wasNull(1); ((long[])buf[2])[0] = rslt.getLong(2); return; case 18: ((long[])buf[0])[0] = rslt.getLong(1); ((long[])buf[1])[0] = rslt.getLong(2); ((bool[])buf[2])[0] = rslt.wasNull(2); return; case 21: ((long[])buf[0])[0] = rslt.getLong(1); ((long[])buf[1])[0] = rslt.getLong(2); ((bool[])buf[2])[0] = rslt.wasNull(2); return; case 27: ((long[])buf[0])[0] = rslt.getLong(1); return; } }
public void getResults(int cursor, IFieldGetter rslt, Object[] buf) { switch (cursor) { case 0: ((long[])buf[0])[0] = rslt.getLong(1); break; } }
public void getResults(int cursor, IFieldGetter rslt, Object[] buf) { switch (cursor) { case 0: ((short[])buf[0])[0] = rslt.getShort(1); ((long[])buf[1])[0] = rslt.getLong(2); return; } }
public ExecutionVisitor(Options options) { this.methodInvoker = new CachedMethodInvoker(this); this.propertyGetter = new CachedReflectionPropertyGetter(methodInvoker); this.constructorInvoker = new CachedConstructorInvoker(methodInvoker); this.typeResolver = new CachedTypeResolver(); this.fieldGetter = new CachedReflectionFieldGetter(methodInvoker); GlobalScope = new JsObject(); Global = new JsGlobal(this, options); GlobalScope.Prototype = Global as JsDictionaryObject; EnterScope(GlobalScope); CallStack = new Stack<string>(); }
public void getResults(int cursor, IFieldGetter rslt, Object[] buf) { switch (cursor) { case 0: ((long[])buf[0])[0] = rslt.getLong(1); ((short[])buf[1])[0] = rslt.getShort(2); return; case 1: ((long[])buf[0])[0] = rslt.getLong(1); ((short[])buf[1])[0] = rslt.getShort(2); return; case 2: ((String[])buf[0])[0] = rslt.getVarchar(1); return; case 3: ((short[])buf[0])[0] = rslt.getShort(1); return; case 4: ((String[])buf[0])[0] = rslt.getVarchar(1); ((long[])buf[1])[0] = rslt.getLong(2); ((short[])buf[2])[0] = rslt.getShort(3); return; case 5: ((long[])buf[0])[0] = rslt.getLong(1); ((short[])buf[1])[0] = rslt.getShort(2); return; case 8: ((String[])buf[0])[0] = rslt.getVarchar(1); return; case 9: ((String[])buf[0])[0] = rslt.getVarchar(1); ((long[])buf[1])[0] = rslt.getLong(2); ((short[])buf[2])[0] = rslt.getShort(3); return; case 10: ((short[])buf[0])[0] = rslt.getShort(1); return; } }
public void getResults(int cursor, IFieldGetter rslt, Object[] buf) { switch (cursor) { case 0: ((String[])buf[0])[0] = rslt.getVarchar(1); ((decimal[])buf[1])[0] = rslt.getDecimal(2); ((short[])buf[2])[0] = rslt.getShort(3); ((DateTime[])buf[3])[0] = rslt.getGXDate(4); return; } }
public void getResults(int cursor, IFieldGetter rslt, Object[] buf) { switch (cursor) { case 0: ((String[])buf[0])[0] = rslt.getVarchar(1); return; case 1: ((long[])buf[0])[0] = rslt.getLong(1); return; } }
public void getResults(int cursor, IFieldGetter rslt, Object[] buf) { switch (cursor) { case 0: ((DateTime[])buf[0])[0] = rslt.getGXDate(1); ((DateTime[])buf[1])[0] = rslt.getGXDate(2); ((String[])buf[2])[0] = rslt.getString(3, 1); ((String[])buf[3])[0] = rslt.getString(4, 1); ((short[])buf[4])[0] = rslt.getShort(5); return; } }
public void getResults(int cursor, IFieldGetter rslt, Object[] buf) { switch (cursor) { case 0: ((int[])buf[0])[0] = rslt.getInt(1); ((bool[])buf[1])[0] = rslt.wasNull(1); ((int[])buf[2])[0] = rslt.getInt(2); ((DateTime[])buf[3])[0] = rslt.getGXDate(3); ((int[])buf[4])[0] = rslt.getInt(4); break; } }
public void getResults(int cursor, IFieldGetter rslt, Object[] buf) { switch (cursor) { case 0: ((DateTime[])buf[0])[0] = rslt.getGXDateTime(1); ((bool[])buf[1])[0] = rslt.wasNull(1); ((String[])buf[2])[0] = rslt.getVarchar(2); ((bool[])buf[3])[0] = rslt.wasNull(2); ((long[])buf[4])[0] = rslt.getLong(3); return; } }
public void getResults(int cursor, IFieldGetter rslt, Object[] buf) { switch (cursor) { case 0: ((Guid[])buf[0])[0] = rslt.getGuid(1); ((Guid[])buf[1])[0] = rslt.getGuid(2); return; case 1: ((Guid[])buf[0])[0] = rslt.getGuid(1); ((Guid[])buf[1])[0] = rslt.getGuid(2); return; case 2: ((Guid[])buf[0])[0] = rslt.getGuid(1); return; case 3: ((Guid[])buf[0])[0] = rslt.getGuid(1); return; case 4: ((Guid[])buf[0])[0] = rslt.getGuid(1); ((Guid[])buf[1])[0] = rslt.getGuid(2); return; case 5: ((Guid[])buf[0])[0] = rslt.getGuid(1); ((Guid[])buf[1])[0] = rslt.getGuid(2); return; case 8: ((Guid[])buf[0])[0] = rslt.getGuid(1); ((Guid[])buf[1])[0] = rslt.getGuid(2); return; case 9: ((Guid[])buf[0])[0] = rslt.getGuid(1); return; case 10: ((Guid[])buf[0])[0] = rslt.getGuid(1); return; } }
public void getResults(int cursor, IFieldGetter rslt, Object[] buf) { switch (cursor) { case 0: ((int[])buf[0])[0] = rslt.getInt(1); ((int[])buf[1])[0] = rslt.getInt(2); break; case 1: ((int[])buf[0])[0] = rslt.getInt(1); break; } }
public ExecutionVisitor(Options options, IScriptEngineContext context) { this.scriptEngineContext = context; this.methodInvoker = context.GetMethodInvoker(this);//new CachedMethodInvoker(this); this.propertyGetter = new CachedReflectionPropertyGetter(methodInvoker); this.constructorInvoker = new CachedConstructorInvoker(methodInvoker); this.typeResolver = context.GetTypeResolver();//new CachedTypeResolver(); this.fieldGetter = new CachedReflectionFieldGetter(methodInvoker); _entitiyAccessor = new EntityAccessor(); GlobalScope = new JsObject(); Global = new JsGlobal(this, options); GlobalScope.Prototype = Global as JsDictionaryObject; EnterScope(GlobalScope); CallStack = new Stack<string>(); }
public void getResults(int cursor, IFieldGetter rslt, Object[] buf) { switch (cursor) { case 0: ((int[])buf[0])[0] = rslt.getInt(1); break; case 1: ((String[])buf[0])[0] = rslt.getString(1, 255); break; case 2: ((String[])buf[0])[0] = rslt.getString(1, 255); break; } }
public void createCursor(IGxDataStore ds, GxErrorHandler errorHandler) { if (_state >= 2) { return; } _stmt = (_staticParameters == null)? _stmt : String.Format(_stmt, _staticParameters); _gxDbCommand = new GxCommand(ds.Db, _stmt, _updatable, ds, "", _name, TTL, hasNested, isForFirst, errorHandler, _batchSize); _gxDbCommand.IsCursor = true; if (_blockSize > 0) { _gxDbCommand.FetchSize = Convert.ToUInt16(_blockSize); } bindParms(_parmBinds); _fldGetter = new GXFatFieldGetter(_gxDbCommand); _fldSetter = new GXFatFieldSetter(_gxDbCommand); _state = 2; _gxDbCommand.ErrorMask = _errMask; }
static void GenericLdtokenFieldsTest() { Func <FieldInfo, string> FieldFullName = (fi) => fi.FieldType + " " + fi.DeclaringType.ToString() + "::" + fi.Name; IFieldGetter getter1 = new FieldGetter <string>(); IFieldGetter getter2 = new FieldGetter <object>(); IFieldGetter getter3 = new FieldGetter <int>(); foreach (var instArg in new Type[] { typeof(String), typeof(object), typeof(int) }) { IFieldGetter getter = (IFieldGetter)Activator.CreateInstance(typeof(FieldGetter <>).MakeGenericType(instArg)); string expectedField1 = "System.Int32 Gen`1[???]::m_Field1".Replace("???", instArg.ToString()); string expectedField2 = "System.String Gen`1[???]::m_Field2".Replace("???", instArg.ToString()); string expectedField3 = "??? Gen`1[???]::m_Field3".Replace("???", instArg.ToString()); string expectedField4 = "System.Collections.Generic.List`1[???] Gen`1[???]::m_Field4".Replace("???", instArg.ToString()); string expectedField5 = "System.Collections.Generic.KeyValuePair`2[???,System.Int32] Gen`1[???]::m_Field5".Replace("???", instArg.ToString()); string expectedDllField1 = "System.String MyGeneric`2[???,???]::m_Field1".Replace("???", instArg.ToString()); string expectedDllField2 = "??? MyGeneric`2[???,???]::m_Field2".Replace("???", instArg.ToString()); string expectedDllField3 = "System.Collections.Generic.List`1[???] MyGeneric`2[???,???]::m_Field3".Replace("???", instArg.ToString()); string expectedDllField4 = "System.Collections.Generic.KeyValuePair`2[???,System.Int32] MyGeneric`2[???,???]::m_Field4".Replace("???", instArg.ToString()); string expectedDllField5 = "System.Int32 MyGeneric`2[???,???]::m_Field5".Replace("???", instArg.ToString()); Assert.AreEqual(expectedField1, FieldFullName(getter.GetGenT_Field1())); Assert.AreEqual(expectedField2, FieldFullName(getter.GetGenT_Field2())); Assert.AreEqual(expectedField3, FieldFullName(getter.GetGenT_Field3())); Assert.AreEqual(expectedField4, FieldFullName(getter.GetGenT_Field4())); Assert.AreEqual(expectedField5, FieldFullName(getter.GetGenT_Field5())); Assert.AreEqual(expectedDllField1, FieldFullName(getter.GetGenDllT_Field1())); Assert.AreEqual(expectedDllField2, FieldFullName(getter.GetGenDllT_Field2())); Assert.AreEqual(expectedDllField3, FieldFullName(getter.GetGenDllT_Field3())); Assert.AreEqual(expectedDllField4, FieldFullName(getter.GetGenDllT_Field4())); Assert.AreEqual(expectedDllField5, FieldFullName(getter.GetGenDllT_Field5())); } }
public void OnDeserialization(object sender) { this.methodInvoker = new CachedMethodInvoker(this); this.propertyGetter = new CachedReflectionPropertyGetter(methodInvoker); this.constructorInvoker = new CachedConstructorInvoker(methodInvoker); this.typeResolver = new CachedTypeResolver(); this.fieldGetter = new CachedReflectionFieldGetter(methodInvoker); }
public virtual void getErrorResults(int cursor, IFieldGetter rslt, Object[] buf) { }
public ClrFieldDescriptor(IFieldGetter getter, IGlobal global, JsDictionaryObject owner, string propertyName) : base(owner, propertyName) { this.global = global; this.getter = getter; }
public void getResults(int cursor, IFieldGetter rslt, Object[] buf) { switch (cursor) { case 0: ((String[])buf[0])[0] = rslt.getVarchar(1); ((String[])buf[1])[0] = rslt.getVarchar(2); ((String[])buf[2])[0] = rslt.getVarchar(3); ((decimal[])buf[3])[0] = rslt.getDecimal(4); ((short[])buf[4])[0] = rslt.getShort(5); break; case 1: ((String[])buf[0])[0] = rslt.getVarchar(1); ((String[])buf[1])[0] = rslt.getVarchar(2); ((String[])buf[2])[0] = rslt.getVarchar(3); ((decimal[])buf[3])[0] = rslt.getDecimal(4); ((short[])buf[4])[0] = rslt.getShort(5); break; case 2: ((String[])buf[0])[0] = rslt.getVarchar(1); ((String[])buf[1])[0] = rslt.getVarchar(2); ((String[])buf[2])[0] = rslt.getVarchar(3); ((decimal[])buf[3])[0] = rslt.getDecimal(4); ((short[])buf[4])[0] = rslt.getShort(5); break; case 3: ((String[])buf[0])[0] = rslt.getVarchar(1); ((String[])buf[1])[0] = rslt.getVarchar(2); ((String[])buf[2])[0] = rslt.getVarchar(3); ((decimal[])buf[3])[0] = rslt.getDecimal(4); ((short[])buf[4])[0] = rslt.getShort(5); break; case 4: ((String[])buf[0])[0] = rslt.getVarchar(1); ((String[])buf[1])[0] = rslt.getVarchar(2); ((String[])buf[2])[0] = rslt.getVarchar(3); ((long[])buf[3])[0] = rslt.getLong(4); ((bool[])buf[4])[0] = rslt.wasNull(4); ((decimal[])buf[5])[0] = rslt.getDecimal(5); ((short[])buf[6])[0] = rslt.getShort(6); ((short[])buf[7])[0] = rslt.getShort(7); break; case 5: ((String[])buf[0])[0] = rslt.getVarchar(1); ((String[])buf[1])[0] = rslt.getVarchar(2); ((String[])buf[2])[0] = rslt.getVarchar(3); ((long[])buf[3])[0] = rslt.getLong(4); ((bool[])buf[4])[0] = rslt.wasNull(4); ((decimal[])buf[5])[0] = rslt.getDecimal(5); ((short[])buf[6])[0] = rslt.getShort(6); ((short[])buf[7])[0] = rslt.getShort(7); break; case 6: ((String[])buf[0])[0] = rslt.getVarchar(1); ((String[])buf[1])[0] = rslt.getVarchar(2); ((String[])buf[2])[0] = rslt.getVarchar(3); ((long[])buf[3])[0] = rslt.getLong(4); ((bool[])buf[4])[0] = rslt.wasNull(4); ((decimal[])buf[5])[0] = rslt.getDecimal(5); ((short[])buf[6])[0] = rslt.getShort(6); ((short[])buf[7])[0] = rslt.getShort(7); break; case 7: ((String[])buf[0])[0] = rslt.getVarchar(1); ((String[])buf[1])[0] = rslt.getVarchar(2); ((String[])buf[2])[0] = rslt.getVarchar(3); ((long[])buf[3])[0] = rslt.getLong(4); ((bool[])buf[4])[0] = rslt.wasNull(4); ((decimal[])buf[5])[0] = rslt.getDecimal(5); ((short[])buf[6])[0] = rslt.getShort(6); ((short[])buf[7])[0] = rslt.getShort(7); break; } }