// Token: 0x060004B1 RID: 1201 RVA: 0x000194CC File Offset: 0x000176CC
        public bool Execute(int waitTimeoutMs, string hint)
        {
            bool      flag      = false;
            Stopwatch stopwatch = new Stopwatch();

            AmStoreHelper.DismountDelegate dismountDelegate = new AmStoreHelper.DismountDelegate(AmStoreHelper.RemoteDismount);
            this.m_completedEvent = new ManualResetEvent(false);
            stopwatch.Start();
            DateTime utcNow = DateTime.UtcNow;

            try
            {
                ReplayCrimsonEvents.ForceDismountingDatabases.Log <AmServerName, string>(AmServerName.LocalComputerName, hint);
                if (this.m_mdbStatuses != null && this.m_mdbStatuses.Length > 0)
                {
                    AmTrace.Debug("DismountDatabasesInParallel.Execute() now starting with timeout of {0} ms...", new object[]
                    {
                        waitTimeoutMs
                    });
                    foreach (MdbStatus mdbStatus in this.m_mdbStatuses)
                    {
                        DismountDatabasesInParallel.AsyncDismountState @object = new DismountDatabasesInParallel.AsyncDismountState(mdbStatus.MdbGuid, dismountDelegate);
                        dismountDelegate.BeginInvoke(null, mdbStatus.MdbGuid, UnmountFlags.SkipCacheFlush, false, new AsyncCallback(this.DismountCompletionCallback), @object);
                    }
                    if (this.m_completedEvent.WaitOne(waitTimeoutMs))
                    {
                        AmTrace.Debug("DismountDatabasesInParallel.Execute() finished dismounting DBs in {0} ms.", new object[]
                        {
                            stopwatch.ElapsedMilliseconds
                        });
                        flag = true;
                    }
                    else
                    {
                        AmTrace.Error("DismountDatabasesInParallel.Execute() timed out waiting for DBs to finish dismounting.", new object[0]);
                        AmStoreServiceMonitor.KillStoreIfRunningBefore(utcNow, "DismountDatabasesInParallel");
                    }
                }
            }
            finally
            {
                ReplayCrimsonEvents.ForceDismountAllDatabasesComplete.Log <bool>(flag);
                lock (this.m_locker)
                {
                    this.m_completedEvent.Close();
                    this.m_completedEvent = null;
                }
            }
            return(flag);
        }
 // Token: 0x060004B3 RID: 1203 RVA: 0x00019770 File Offset: 0x00017970
 public AsyncDismountState(Guid mdbGuid, AmStoreHelper.DismountDelegate dismountFunc)
 {
     this.MdbGuid          = mdbGuid;
     this.DismountFunction = dismountFunc;
 }
 // Token: 0x060004AA RID: 1194 RVA: 0x00019458 File Offset: 0x00017658
 private static void DismountCompletionCallback(IAsyncResult ar)
 {
     AmStoreHelper.DismountDelegate dismountDelegate = (AmStoreHelper.DismountDelegate)ar.AsyncState;
     dismountDelegate.EndInvoke(ar);
 }