コード例 #1
0
ファイル: MatchingService.svc.cs プロジェクト: fwka1605/next
 public async Task< MatchingResult> SequentialMatchingAsync(string SessionKey,
     Collation[] Collations,
     CollationSearch CollationSearch,
     string connectionId)
     => await authorizationProcessor.DoAuthorizeAsync(SessionKey, async token =>
     {
         var notifier = hubContext.CreateNotifier(connectionId);
         try
         {
             var result = await matchingSequentialProcessor.MatchAsync(Collations, CollationSearch, token, notifier);
             return result;
         }
         catch (Exception)
         {
             notifier?.Abort(); // todo: cancellation
             throw;
         }
     }, logger, connectionId);
コード例 #2
0
ファイル: MatchingController.cs プロジェクト: fwka1605/next
 public async Task <ActionResult <MatchingResult> > SequentialMatchingR(MatchingSequentialSource source)
 => await hubContext.DoAsync(source.Option.ConnectionId, async (notifier, token) => await matchingSequentialProcessor.MatchAsync(source.Collations, source.Option, token, notifier));