示例#1
0
        public static async Task <PTSRreResult> RequestPODEmailAsync(PTSRreRequest input)
        {
            // must track first
            TrackInfo tracking = TrackingAPI.Track(input.TrackId);

            input.MpDate    = tracking.MPDATE;
            input.MpSuffix  = tracking.MPSUFFIX;
            input.TableCode = tracking.TABLECODE;
            List <PTSRreResult> list = await RequestPODViaEmailAsync(new List <PTSRreRequest> {
                input
            });

            return(list.First());
        }
示例#2
0
        public static async Task <List <PTSRreResult> > RequestPODEmailAsync(List <PTSRreRequest> input)
        {
            // must track first
            List <TrackInfo> tracking = TrackingAPI.Track(input.Select(o => o.TrackId).ToList());

            input.AsParallel().ForAll(o =>
            {
                TrackInfo trackInfo = tracking.First(p => p.ID == o.TrackId);
                o.MpDate            = trackInfo.MPDATE;
                o.MpSuffix          = trackInfo.MPSUFFIX;
                o.TableCode         = trackInfo.TABLECODE;
            });

            return(await RequestPODViaEmailAsync(input));
        }