Beispiel #1
0
        public void Remove(Base.Message.ByteArrayPart part)
        {
            string domainName = part.ToString();

            var account = accounts2.GetValue(domainName);

            if (account != null)
            {
                accounts1.Remove(account.Id);
                accounts2.Remove(account.DomainName);

                Account.Delete(files.GetFileName(account.Id));

                try
                {
                    var directory = files.GetAccountRootDirectory(account.Id);
                    if (directory != null)
                    {
                        System.IO.Directory.Delete(directory, true);
                    }
                }
                catch
                {
                }
            }
        }