Ejemplo n.º 1
0
        static StackObject *BindSingletonService_TService_TConcrete(ILIntepreter intp, StackObject *esp, IList <object> mStack, CLRMethod method, bool isNewObj)
        {
            var genericArguments = method.GenericArguments;

            if (genericArguments == null || genericArguments.Length != 2 || method.ParameterCount != 0)
            {
                throw new EntryPointNotFoundException();
            }

            var tService = XILUtil.ITypeToService(genericArguments[0]);
            var tType    = XILUtil.ITypeToClrType(genericArguments[1]);

            ILRuntime.Runtime.Enviorment.AppDomain __domain = intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(esp, 1);
            TinaX.IXCore instance_of_this_method = (TinaX.IXCore) typeof(TinaX.IXCore).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, mStack));
            intp.Free(ptr_of_this_method);

            instance_of_this_method.Services.Bind(tService, tType, true);
            //instance_of_this_method.BindSingletonService<ILRuntime.Runtime.Intepreter.ILTypeInstance, ILRuntime.Runtime.Intepreter.ILTypeInstance>();

            return(__ret);
        }
        static StackObject *get_Services_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, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            TinaX.IXCore instance_of_this_method = (TinaX.IXCore) typeof(TinaX.IXCore).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.Services;

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
        static StackObject *GetService_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.Object[] @userParams = (System.Object[]) typeof(System.Object[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            TinaX.IXCore instance_of_this_method = (TinaX.IXCore) typeof(TinaX.IXCore).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.GetService <TinaX.VFSKit.IVFS>(@userParams);

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }