Exemple #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);
            }
        }
        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);
            }
        }
Exemple #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);
        }
Exemple #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);
        }