public static bool DataTypeIsSupported(CPTNumericDataType format)
        {
            IntPtr formatPtr = Marshal.AllocHGlobal (Marshal.SizeOf ( typeof (CPTNumericDataType)));
            bool result;

            try {
                Marshal.StructureToPtr ((object)format, formatPtr, true);

                result = _DataTypeIsSupported (formatPtr);
            }
            finally {
                Marshal.FreeHGlobal (formatPtr);
            }
            return result;
        }
Esempio n. 2
0
        public static bool DataTypeIsSupported(CPTNumericDataType format)
        {
            IntPtr formatPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(CPTNumericDataType)));

            bool result;

            try {
                Marshal.StructureToPtr((object)format, formatPtr, true);

                result = _DataTypeIsSupported(formatPtr);
            }
            finally {
                Marshal.FreeHGlobal(formatPtr);
            }
            return(result);
        }
        public static bool DataTypeEqualToDataType(CPTNumericDataType dataType1, CPTNumericDataType dataType2)
        {
            IntPtr dataType1Ptr = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (CPTNumericDataType)));
            IntPtr dataType2Ptr = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (CPTNumericDataType)));
            bool result;

            try {
                Marshal.StructureToPtr ((object)dataType1, dataType1Ptr, true);
                Marshal.StructureToPtr ((object)dataType2, dataType2Ptr, true);

                result = _DataTypeEqualToDataType (dataType1Ptr, dataType2Ptr);
            }
            finally {
                Marshal.FreeHGlobal (dataType1Ptr);
                Marshal.FreeHGlobal (dataType2Ptr);
            }
            return result;
        }
Esempio n. 4
0
        public static bool DataTypeEqualToDataType(CPTNumericDataType dataType1, CPTNumericDataType dataType2)
        {
            IntPtr dataType1Ptr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(CPTNumericDataType)));

            IntPtr dataType2Ptr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(CPTNumericDataType)));
            bool   result;

            try {
                Marshal.StructureToPtr((object)dataType1, dataType1Ptr, true);
                Marshal.StructureToPtr((object)dataType2, dataType2Ptr, true);

                result = _DataTypeEqualToDataType(dataType1Ptr, dataType2Ptr);
            }
            finally {
                Marshal.FreeHGlobal(dataType1Ptr);
                Marshal.FreeHGlobal(dataType2Ptr);
            }
            return(result);
        }
Esempio n. 5
0
 //[Verify (PlatformInvoke)]
 static extern bool CPTDataTypeEqualToDataType(CPTNumericDataType dataType1, CPTNumericDataType dataType2);
Esempio n. 6
0
 //[Verify (PlatformInvoke)]
 static extern bool CPTDataTypeIsSupported(CPTNumericDataType format);
Esempio n. 7
0
 //[Verify (PlatformInvoke)]
 static extern NSString CPTDataTypeStringFromDataType(CPTNumericDataType dataType);