System.Net.LazyAsyncResult.Cleanup C# (CSharp) Method

Cleanup() protected method

protected Cleanup ( ) : void
return void
        protected virtual void Cleanup()
        {
        }

Usage Example

        private static void WorkerThreadComplete(object state)
        {
            Debug.Assert(state is LazyAsyncResult);
            LazyAsyncResult thisPtr = (LazyAsyncResult)state;

            try
            {
                thisPtr._asyncCallback !(thisPtr);
            }
            finally
            {
                thisPtr.Cleanup();
            }
        }