// Token: 0x060002DA RID: 730 RVA: 0x0000FFC0 File Offset: 0x0000E1C0
        protected override void RunInternal()
        {
            Exception lastException = AmHelper.HandleKnownExceptions(delegate(object param0, EventArgs param1)
            {
                this.CheckIfOperationIsAllowedOnCurrentRole();
                AmDbStateInfo amDbStateInfo = AmSystemManager.Instance.Config.DbState.Read(base.Database.Guid);
                if (!amDbStateInfo.IsAdminDismounted)
                {
                    AmTrace.Debug("AmDbDismountAdminDismountedOperation skipped since database is not marked as admin dismounted anymore", new object[0]);
                    return;
                }
                MountStatus storeDatabaseMountStatus = AmStoreHelper.GetStoreDatabaseMountStatus(null, base.Database.Guid);
                if (storeDatabaseMountStatus == MountStatus.Mounted)
                {
                    AmDbAction amDbAction = base.PrepareDbAction(this.ActionCode);
                    ReplayCrimsonEvents.DismountingAdminDismountRequestedDatabase.Log <string, Guid, AmServerName>(base.Database.Name, base.Database.Guid, amDbStateInfo.ActiveServer);
                    amDbAction.Dismount(UnmountFlags.None);
                    return;
                }
                AmTrace.Debug("AmDbDismountAdminDismountedOperation skipped since database is not mounted (db={0}, mountStatus={1})", new object[]
                {
                    base.Database.Name,
                    storeDatabaseMountStatus
                });
            });

            base.LastException = lastException;
        }
Beispiel #2
0
        // Token: 0x060002BC RID: 700 RVA: 0x0000FACC File Offset: 0x0000DCCC
        protected override void RunInternal()
        {
            Exception lastException = AmHelper.HandleKnownExceptions(delegate(object param0, EventArgs param1)
            {
                AmDbAction amDbAction = base.PrepareDbAction(this.ActionCode);
                amDbAction.Dismount(this.Flags);
            });

            base.LastException = lastException;
        }