Example #1
0
        ///////////////////////////////////////////////////////////////////////////////////////////////

        private static void InitializeTypes()
        {
            lock (staticSyncRoot) /* TRANSACTIONAL */
            {
                if (numberTypes == null)
                {
                    numberTypes = new TypeDelegateDictionary();
                    numberTypes.Add(typeof(bool), null);
                    numberTypes.Add(typeof(sbyte), null);
                    numberTypes.Add(typeof(byte), null);
                    numberTypes.Add(typeof(short), null);
                    numberTypes.Add(typeof(ushort), null);
                    numberTypes.Add(typeof(char), null);
                    numberTypes.Add(typeof(int), null);
                    numberTypes.Add(typeof(uint), null);
                    numberTypes.Add(typeof(long), null);
                    numberTypes.Add(typeof(ulong), null);
                    numberTypes.Add(typeof(Enum), null);
                    numberTypes.Add(typeof(ReturnCode), null);
                    numberTypes.Add(typeof(MatchMode), null);
                    numberTypes.Add(typeof(MidpointRounding), null);
                    numberTypes.Add(typeof(decimal), null);
                    numberTypes.Add(typeof(float), null);
                    numberTypes.Add(typeof(double), null);
                }
            }
        }
Example #2
0
        ///////////////////////////////////////////////////////////////////////

        private static bool InitializeNativeDelegates(
            bool clear
            )
        {
            lock (syncRoot) /* TRANSACTIONAL */
            {
                if (nativeDelegates == null)
                {
                    nativeDelegates = new TypeDelegateDictionary();
                }
                else if (clear)
                {
                    nativeDelegates.Clear();
                }

                nativeDelegates.Add(typeof(Eagle_GetVersion), null);
                nativeDelegates.Add(typeof(Eagle_AllocateMemory), null);
                nativeDelegates.Add(typeof(Eagle_FreeMemory), null);
                nativeDelegates.Add(typeof(Eagle_FreeElements), null);
                nativeDelegates.Add(typeof(Eagle_SplitList), null);
                nativeDelegates.Add(typeof(Eagle_JoinList), null);
            }

            return(true);
        }