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

CloseAppDomainCallback() private method

private CloseAppDomainCallback ( TimerThread timer, int timeNoticed, object context ) : void
timer TimerThread
timeNoticed int
context object
return void
        private static void CloseAppDomainCallback(TimerThread.Timer timer, int timeNoticed, object context)
        {
            try
            {
                AppDomain domain = context as AppDomain;
                if (domain == null)
                {
                    CloseAppDomain((int) context);
                }
                else
                {
                    if (object.ReferenceEquals(domain, s_ExcessAppDomain))
                    {
                        try
                        {
                            AppDomain.Unload(domain);
                        }
                        catch (AppDomainUnloadedException) { }
                        s_ExcessAppDomain = null;
                    }
                }
            }
            catch (Exception exception)
            {
                if (NclUtilities.IsFatal(exception)) throw;
            }
        }