コード例 #1
0
        Error(IId AuthorizatorId,
              ISendChargeDetailRecords ISendChargeDetailRecords,
              IEnumerable <ChargeDetailRecord> ResultMap,
              String Description            = null,
              IEnumerable <String> Warnings = null,
              TimeSpan?Runtime = null)


        => new SendCDRsResult(AuthorizatorId,
                              ISendChargeDetailRecords,
                              SendCDRsResultTypes.Success,
                              ResultMap.Select(cdr => new SendCDRResult(cdr, SendCDRResultTypes.Error)),
                              Description,
                              Warnings,
                              Runtime);
コード例 #2
0
        /// <summary>
        /// Create a new send charge detail records result.
        /// </summary>
        /// <param name="AuthorizatorId">The identification of the charge detail record sending entity.</param>
        /// <param name="ISendChargeDetailRecords">The entity sending charge detail records.</param>
        /// <param name="Result">The result of the charge detail record transmission.</param>
        /// <param name="ResultMap">Status information about all charge detail records.</param>
        /// <param name="Description">An optional description of the send charge detail records result.</param>
        /// <param name="Warnings">Warnings or additional information.</param>
        /// <param name="Runtime">The runtime of the request.</param>
        internal SendCDRsResult(IId AuthorizatorId,
                                ISendChargeDetailRecords ISendChargeDetailRecords,
                                SendCDRsResultTypes Result,
                                IEnumerable <SendCDRResult> ResultMap,
                                String Description            = null,
                                IEnumerable <String> Warnings = null,
                                TimeSpan?Runtime = null)
        {
            this.AuthorizatorId           = AuthorizatorId;
            this.ISendChargeDetailRecords = ISendChargeDetailRecords;
            this.Result      = Result;
            this.ResultMap   = ResultMap ?? new SendCDRResult[0];
            this.Description = Description;
            this.Warnings    = Warnings != null
                                                 ? Warnings.Where(warning => warning != null).
                               SafeSelect(warning => warning.Trim()).
                               Where(warning => warning.IsNotNullOrEmpty())
                                                 : new String[0];

            this.Runtime = Runtime;
        }