Пример #1
0
        private void RegisterFunctionPointer(string functionName, MemberInfo method, List <ProtoCore.Type> argTypes, ProtoCore.Type retype)
        {
            List <FFIFunctionPointer> pointers = GetFunctionPointers(functionName);
            FFIFunctionPointer        f        = null;

            if (CoreUtils.IsDisposeMethod(functionName))
            {
                f = new DisposeFunctionPointer(Module, method, retype);
            }
            else if (CoreUtils.IsGetter(functionName))
            {
                f = new GetterFunctionPointer(Module, functionName, method, retype);
            }
            else
            {
                f = new CLRFFIFunctionPointer(Module, functionName, method, argTypes, retype);
            }

            if (!pointers.Contains(f))
            {
                pointers.Add(f);
            }
        }
Пример #2
0
        private void RegisterFunctionPointer(string functionName, MemberInfo method, ProtoCore.Type retype)
        {
            List <FFIFunctionPointer> pointers = GetFunctionPointers(functionName);
            FFIFunctionPointer        f        = null;

            if (functionName == ProtoCore.DSDefinitions.Keyword.Dispose)
            {
                f = new DisposeFunctionPointer(Module, method, retype);
            }
            else if (CoreUtils.IsGetter(functionName))
            {
                f = new GetterFunctionPointer(Module, functionName, method, retype);
            }
            else
            {
                f = new CLRFFIFunctionPointer(Module, functionName, method, null, retype);
            }

            if (!pointers.Contains(f))
            {
                pointers.Add(f);
            }
        }
Пример #3
0
        private void RegisterFunctionPointer(string functionName, MemberInfo method, List<ProtoCore.Type> argTypes, ProtoCore.Type retype)
        {
            List<FFIFunctionPointer> pointers = GetFunctionPointers(functionName);
            FFIFunctionPointer f = null;
            if (CoreUtils.IsDisposeMethod(functionName))
                f = new DisposeFunctionPointer(Module, method, retype);
            else if (CoreUtils.IsGetter(functionName))
                f = new GetterFunctionPointer(Module, functionName, method, retype);
            else
                f = new CLRFFIFunctionPointer(Module, functionName, method, argTypes, retype);

            if (!pointers.Contains(f))
                pointers.Add(f);
        }
Пример #4
0
        private void RegisterFunctionPointer(string functionName, MemberInfo method, ProtoCore.Type retype)
        {
            List<FFIFunctionPointer> pointers = GetFunctionPointers(functionName);
            FFIFunctionPointer f = null;
            if (functionName == ProtoCore.DSDefinitions.Keyword.Dispose)
                f = new DisposeFunctionPointer(Module, method, retype);
            else if (CoreUtils.IsGetter(functionName))
                f = new GetterFunctionPointer(Module, functionName, method, retype);
            else
                f = new CLRFFIFunctionPointer(Module, functionName, method, null, retype);

            if (!pointers.Contains(f))
                pointers.Add(f);
        }