コード例 #1
0
ファイル: Reference.cs プロジェクト: romanlum/StudyCode
 public double TotalCosts(string tariffKey, PhoneConsumption consumption)
 {
     object[] results = this.Invoke("TotalCosts", new object[] {
         tariffKey,
         consumption
     });
     return((double)(results[0]));
 }
コード例 #2
0
ファイル: Reference.cs プロジェクト: romanlum/StudyCode
 /// <remarks/>
 public void TotalCostsAsync(string tariffKey, PhoneConsumption consumption, object userState)
 {
     if ((this.TotalCostsOperationCompleted == null))
     {
         this.TotalCostsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnTotalCostsOperationCompleted);
     }
     this.InvokeAsync("TotalCosts", new object[] {
         tariffKey,
         consumption
     }, this.TotalCostsOperationCompleted, userState);
 }
コード例 #3
0
        public override double TotalCosts(string tariffKey, PhoneConsumption consumption)
        {
            var serice       = new PhoneTariffService.TariffCalcualtorService();
            var wsConsumtion = new PhoneTariffService.PhoneConsumption
            {
                ZoneConsumptions = consumption.ZoneConsumptions.Select(x => new PhoneTariffService.ZoneConsumption
                {
                    OffPeakDuration = x.OffPeakDuration,
                    PeakDuration    = x.PeakDuration,
                    ZoneId          = x.ZoneId
                }).ToArray()
            };

            return(serice.TotalCosts(tariffKey, wsConsumtion));
        }
コード例 #4
0
ファイル: Reference.cs プロジェクト: romanlum/StudyCode
 /// <remarks/>
 public void TotalCostsAsync(string tariffKey, PhoneConsumption consumption)
 {
     this.TotalCostsAsync(tariffKey, consumption, null);
 }