Esempio n. 1
0
        public void Destroy()
        {
            if (!this.isLocked)
            {
                throw new InvalidOperationException("This prison is not locked.");
            }

            Logger.Debug("Destroying prison {0}", this.ID);

            foreach (var cell in prisonCells)
            {
                cell.Destroy(this);
            }

            this.jobObject.TerminateProcesses(-1);

            this.jobObject.Dispose();
            this.jobObject = null;

            // TODO: Should destroy delete the home directory???
            // Directory.CreateDirectory(prisonRules.PrisonHomePath);

            this.TryStopGuard();
            this.UnloadUserProfileUntilReleased();
            this.DeleteUserProfile();
            this.user.Delete();

            SystemVirtualAddressSpaceQuotas.RemoveQuotas(new SecurityIdentifier(this.user.UserSID));

            this.DeletePersistedPrirson();
        }
Esempio n. 2
0
 private void SystemRemoveQuota()
 {
     SystemVirtualAddressSpaceQuotas.RemoveQuotas(new SecurityIdentifier(this.user.UserSID));
 }