コード例 #1
0
        /// <summary>
        /// Rebuild the internals
        /// </summary>
        private void DoRebuild()
        {
            lock (this)
            {
                if (_needsRebuild)
                {
                    if (string.IsNullOrEmpty(MethodID))
                    {
                        return;
                    }
                    _suppressRebuild = true;
                    _methodWrapper   = MethodWrapper.Create(GetFullID());
                    if (_methodWrapper != null)
                    {
                        if (waitHandle == null)
                        {
                            waitHandle = new ManualResetEvent(false);
                        }
                        else
                        {
                            waitHandle.Reset();
                        }
                    }
                    _needsRebuild    = false;
                    _suppressRebuild = false;

                    //Add by Kasem for Improve Method Faster Start
                    //_workerThreadDel = new MethodInvoker(RunWorkerAsync);
                    //_spawnedThreadDel = new MethodInvoker(RunAction);
                    //_completeCallBack = new AsyncCallback(Completed);
                }
            }
        }