static StackObject *Ctor_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 3);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Single @z = *(float *)&ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Single @y = *(float *)&ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            System.Single @x = *(float *)&ptr_of_this_method->Value;


            var result_of_this_method = new ILRuntimeTest.TestFramework.TestVector3NoBinding(@x, @y, @z);

            if (!isNewObj)
            {
                __ret--;
                WriteBackInstance(__domain, __ret, __mStack, ref result_of_this_method);
                return(__ret);
            }

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
        static object PerformMemberwiseClone(ref object o)
        {
            var ins = new ILRuntimeTest.TestFramework.TestVector3NoBinding();

            ins = (ILRuntimeTest.TestFramework.TestVector3NoBinding)o;
            return(ins);
        }
 static StackObject *AssignFromStack_x_1(ref object o, ILIntepreter __intp, StackObject *ptr_of_this_method, IList <object> __mStack)
 {
     ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
     System.Single @x = *(float *)&ptr_of_this_method->Value;
     ILRuntimeTest.TestFramework.TestVector3NoBinding ins = (ILRuntimeTest.TestFramework.TestVector3NoBinding)o;
     ins.x = @x;
     o     = ins;
     return(ptr_of_this_method);
 }
        static void WriteBackInstance(ILRuntime.Runtime.Enviorment.AppDomain __domain, StackObject *ptr_of_this_method, IList <object> __mStack, ref ILRuntimeTest.TestFramework.TestVector3NoBinding instance_of_this_method)
        {
            ptr_of_this_method = ILIntepreter.GetObjectAndResolveReference(ptr_of_this_method);
            switch (ptr_of_this_method->ObjectType)
            {
            case ObjectTypes.Object:
            {
                __mStack[ptr_of_this_method->Value] = instance_of_this_method;
            }
            break;

            case ObjectTypes.FieldReference:
            {
                var ___obj = __mStack[ptr_of_this_method->Value];
                if (___obj is ILTypeInstance)
                {
                    ((ILTypeInstance)___obj)[ptr_of_this_method->ValueLow] = instance_of_this_method;
                }
                else
                {
                    var t = __domain.GetType(___obj.GetType()) as CLRType;
                    t.SetFieldValue(ptr_of_this_method->ValueLow, ref ___obj, instance_of_this_method);
                }
            }
            break;

            case ObjectTypes.StaticFieldReference:
            {
                var t = __domain.GetType(ptr_of_this_method->Value);
                if (t is ILType)
                {
                    ((ILType)t).StaticInstance[ptr_of_this_method->ValueLow] = instance_of_this_method;
                }
                else
                {
                    ((CLRType)t).SetStaticFieldValue(ptr_of_this_method->ValueLow, instance_of_this_method);
                }
            }
            break;

            case ObjectTypes.ArrayReference:
            {
                var instance_of_arrayReference = __mStack[ptr_of_this_method->Value] as ILRuntimeTest.TestFramework.TestVector3NoBinding[];
                instance_of_arrayReference[ptr_of_this_method->ValueLow] = instance_of_this_method;
            }
            break;
            }
        }
        static StackObject *op_Multiply_1(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Single @b = *(float *)&ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            ILRuntimeTest.TestFramework.TestVector3NoBinding @a = (ILRuntimeTest.TestFramework.TestVector3NoBinding) typeof(ILRuntimeTest.TestFramework.TestVector3NoBinding).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 16);
            __intp.Free(ptr_of_this_method);


            var result_of_this_method = a * b;

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
コード例 #6
0
        static ILRuntimeTest.TestFramework.TestVector3NoBinding ToColor(string str)
        {
            string strNew = str.StartsWith("#") ? str.Remove(0, 1) : str;
            string str1   = strNew.Substring(0, 2);
            string str2   = strNew.Substring(2, 2);
            string str3   = strNew.Substring(4, 2);
            float  num1   = (float)Convert.ToInt64(str1, 16) / 255;
            float  num2   = (float)Convert.ToInt64(str2, 16) / 255;
            float  num3   = (float)Convert.ToInt64(str3, 16) / 255;

            if (strNew.Length > 7)
            {
                string str4 = strNew.Substring(6, 2);
                float  num4 = (float)Convert.ToInt64(str4, 16) / 255;
                ILRuntimeTest.TestFramework.TestVector3NoBinding color1 = new ILRuntimeTest.TestFramework.TestVector3NoBinding(num1, num3, num4);
                return(color1);
            }
            ILRuntimeTest.TestFramework.TestVector3NoBinding color = new ILRuntimeTest.TestFramework.TestVector3NoBinding(num1, num2, num3);
            return(color);
        }
 static void set_x_1(ref object o, object v)
 {
     ILRuntimeTest.TestFramework.TestVector3NoBinding ins = (ILRuntimeTest.TestFramework.TestVector3NoBinding)o;
     ins.x = (System.Single)v;
     o     = ins;
 }