Ejemplo n.º 1
0
 public static void CreateObject(ref mdr.CallFrame callFrame, int resultIndex, int fieldsCount)
 {
   //Here we assume we have (fieldId, value) pairs on the stack starting at resultIndex
   var values = callFrame.Values;
   var obj = new mdr.DObject();
   var lastSP = resultIndex + fieldsCount * 2;
   for (var sp = resultIndex; sp < lastSP; sp += 2)
     obj.SetFieldByFieldId(values[sp].AsInt32(), ref values[sp + 1]);
   values[resultIndex].Set(obj);
 }
Ejemplo n.º 2
0
        public static void CreateObject(ref mdr.CallFrame callFrame, int resultIndex, int fieldsCount)
        {
            //Here we assume we have (fieldId, value) pairs on the stack starting at resultIndex
            var values = callFrame.Values;
            var obj    = new mdr.DObject();
            var lastSP = resultIndex + fieldsCount * 2;

            for (var sp = resultIndex; sp < lastSP; sp += 2)
            {
                obj.SetFieldByFieldId(values[sp].AsInt32(), ref values[sp + 1]);
            }
            values[resultIndex].Set(obj);
        }