System.Net.AutoWebProxyScriptWrapper.Close C# (CSharp) Method

Close() private method

private Close ( ) : void
return void
        internal void Close()
        {
            if (Interlocked.Increment(ref closed) != 1)
            {
                return;
            }

            GlobalLog.Print("AutoWebProxyScriptWrapper#" + ValidationHelper.HashString(this) + "::Close() Closing engine.");

            // Time out any running thread.
            TimerThread.Timer timer = activeTimer;
            if (timer != null)
            {
                if (timer.Cancel())
                {
                    InterruptCallback(timer, 0, this);
                }
                activeTimer = null;
            }

            jscript.Close();
            jscriptObject = null;
            jscript = null;
            host = null;
            jscriptParser = null;
            dispatch = null;
            script = null;
            scriptText = null;
            lastModified = DateTime.MinValue;
        }

Usage Example

 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (scriptInstance != null)
         {
             scriptInstance.Close();
         }
     }
 }
All Usage Examples Of System.Net.AutoWebProxyScriptWrapper::Close