private void PayHandler(object sender, IUser user) { if (!_disconectedUserCollection.Contains(user)) return; var sourcePort = _ats.PortsMapping[user.Phone.Number]; _billingSystem.UserPayDateTime[user] = TimeHelper.Now; _ats.PortsMapping[user.Phone.Number].RegisterEventHandlersForTerminal(user.Phone); _ats.RegisterEventHandlersForTerminal(user.Phone); _ats.RegisterEventHandlersForPort(sourcePort); user.Phone.RegisterEventHandlersForPort(sourcePort); user.Plug(); _disconectedUserCollection.Remove(user); Console.WriteLine($"Abonent : {user.Phone.Number.Number}; Pay for his phone. And can resume calls."); }