コード例 #1
0
 private void RegisterHandlerForStation(IAutoTelephoneStaition station)
 {
     station.GetCall().Call += (sender, callInfo) =>
     {
         var user = GetUserByTerminal(sender as Terminal);
         CallService.SetAdditionalInfo(user, callInfo);
         CallService.AddCall(callInfo);
     };
 }
コード例 #2
0
 public Billing(IAutoTelephoneStaition station, List <PhoneNumber> phones)
 {
     this.PhoneNumbers = new Dictionary <PhoneNumber, bool>();
     this.Users        = new List <IUser>();
     this.Station      = station;
     this.CallService  = new CallService();
     this.Tarif        = 0.9;
     foreach (var item in phones)
     {
         PhoneNumbers.Add(item, true);
     }
     RegisterHandlerForStation(station);
 }