Esempio n. 1
0
        public void DisbandGang(Gang gang)
        {
            _gangRepository.Delete(gang);

            void Finish()
            {
                Message.Builder.SetCommand(Commands.GangDelete).WithData(gang.GetGangData()).ToCharacters(gang.GetMembers()).Send();
                _channelManager.DeleteChannel(gang.ChannelName);
                _gangs.Remove(gang.Id);
                GangDisbanded?.Invoke(gang);
            }

            if (Transaction.Current != null)
            {
                Transaction.Current.OnCommited(Finish);
            }
            else
            {
                Finish();
            }
        }