public void Start(object obj)
        {
            if (m_cThread == null)
            {
                return;
            }

            if (_delStartObject == null)
            {
                _delStartObject = CDelegateEx.CreateDelegate <DelStartObject> (m_cThread, _ctypeThread.GetMethod("Start", new CType[] { typeof(object) }));
            }

            _delStartObject(obj);
        }
        public void Sleep(int timeoutInMs)
        {
            if (m_cThread == null)
            {
                return;
            }

            if (_delSleep == null)
            {
                _delSleep = CDelegateEx.CreateDelegate <DelSleep> (m_cThread, "Sleep");
            }

            _delSleep(timeoutInMs);
        }
        public void Start()
        {
            if (m_cThread == null)
            {
                return;
            }

            if (_delStart == null)
            {
                _delStart = CDelegateEx.CreateDelegate <DelStart> (m_cThread, _ctypeThread.GetMethod("Start", CTypeExtensions.CTypeEmptyArray));
            }

            _delStart();
        }
        public void Join()
        {
            if (m_cThread == null)
            {
                return;
            }

            if (_delJoin == null)
            {
                _delJoin = CDelegateEx.CreateDelegate <DelJoin> (m_cThread, _ctypeThread.GetMethod("Join", CTypeExtensions.CTypeEmptyArray));
            }

            _delJoin();
        }
        public bool Join(int millisecondTimeout)
        {
            if (m_cThread == null)
            {
                return(false);
            }

            if (_delJoinTimeOut == null)
            {
                _delJoinTimeOut = CDelegateEx.CreateDelegate <DelJoinTimeout> (m_cThread, _ctypeThread.GetMethod("Join", new CType[] { typeof(int) }));
            }

            return(_delJoinTimeOut(millisecondTimeout));
        }
        public override bool Equals(object obj)
        {
            if (m_cThread == null)
            {
                return(false);
            }

            if (_delEquals == null)
            {
                _delEquals = CDelegateEx.CreateDelegate <DelEquals> (m_cThread, "Equals");
            }

            return(_delEquals(obj));
        }
        public override int GetHashCode()
        {
            if (m_cThread == null)
            {
                return(base.GetHashCode());
            }

            if (_delGetHashCode == null)
            {
                _delGetHashCode = CDelegateEx.CreateDelegate <DelGetHashCode> (m_cThread, "GetHashCode");
            }

            return(_delGetHashCode());
        }
        public static void SetData(LocalDataStoreSlot slot, object data)
        {
            if (_ctypeThreadType == null)
            {
                return;
            }

            if (_delSetData == null)
            {
                _delSetData = CDelegateEx.CreateDelegate <DelSetData> (_ctypeThread, "SetData");
            }

            _delSetData(slot, data);
        }
        public void Abort()
        {
            if (m_cThread == null)
            {
                return;
            }

            if (_delAbort == null)
            {
                _delAbort = CDelegateEx.CreateDelegate <DelAbort> (m_cThread, "Abort");
            }

            _delAbort();
        }
        public static LocalDataStoreSlot GetNamedDataSlot(string name)
        {
            if (_ctypeThreadType == null)
            {
                return(null);
            }

            if (_delGetNamedDataSlot == null)
            {
                _delGetNamedDataSlot = CDelegateEx.CreateDelegate <DelGetNamedDataSlot> (_ctypeThread, "GetNamedDataSlot");
            }

            return(_delGetNamedDataSlot(name));
        }
        public static object GetData(LocalDataStoreSlot slot)
        {
            if (_ctypeThreadType == null)
            {
                return(null);
            }

            if (_delGetData == null)
            {
                _delGetData = CDelegateEx.CreateDelegate <DelGetData> (_ctypeThread, "GetData");
            }

            return(_delGetData(slot));
        }
        public static void FreeNamedDataSlot(string name)
        {
            if (_ctypeThreadType == null)
            {
                return;
            }

            if (_delFreeNamedDataSlot == null)
            {
                _delFreeNamedDataSlot = CDelegateEx.CreateDelegate <DelFreeNamedDataSlot> (_ctypeThread, "FreeNamedDataSlot");
            }

            _delFreeNamedDataSlot(name);
        }
        public static bool AllowOtherAppsToRun(string name)
        {
            if (_ctypeThreadType == null)
            {
                return(false);
            }

            if (_delAllowOtherAppsToRun == null)
            {
                _delAllowOtherAppsToRun = CDelegateEx.CreateDelegate <DelAllowOtherAppsToRun> (_ctypeThread, "AllowOtherAppsToRun");
            }

            return(_delAllowOtherAppsToRun());
        }
        public static LocalDataStoreSlot AllocateDataSlot()
        {
            if (_ctypeThreadType == null)
            {
                return(null);
            }

            if (_delAllocateDataSlot == null)
            {
                _delAllocateDataSlot = CDelegateEx.CreateDelegate <DelAllocateDataSlot> (_ctypeThread, "AllocateDataSlot");
            }

            return(_delAllocateDataSlot());
        }