示例#1
0
 static IObservable <Unit> AddImages(
     IAuctionProcedures soap,
     IImageLookup imgs,
     Consent c,
     AuctionHandle a) => Observable.Merge(
     imgs.Get(a.LotId)
     .Select(x => soap.AddImage(c, x, a.RequestId)));
示例#2
0
 static IObservable <BatchProcessResult> Upload(IAuctionProcedures soap,
                                                IImageLookup imgs,
                                                Consent c,
                                                Lot input) =>
 CreateAuction(soap, c, input)
 .SelectMany(x => Observable.Concat(
                 Observable.Return(Add(x)),
                 AddImages(soap, imgs, c, x).Select(_ => Image(x)),
                 soap.Commit(c, x.RequestId).Select(_ => Commit(x)))
             );
示例#3
0
 public static IObservable <BatchProcessResult> UploadBatch(
     IAuctionProcedures soap,
     IImageLookup imgs,
     Consent c,
     IEnumerable <Lot> input) =>
 input.ToObservable().SelectMany(x => Upload(soap, imgs, c, x));