Esempio n. 1
0
 private IObservable <TResponse> GetStream <TResponse>(ResponseFactory <TResponse> factory, BroadcastFlags requiredFlags = BroadcastFlags.None)
 {
     if (requiredFlags != BroadcastFlags.None && !BroadcastFlags.HasFlag(requiredFlags))
     {
         SetBroadcastFlags(new SetBroadcastFlagsRequest {
             BroadcastFlags = BroadcastFlags | requiredFlags
         });
     }
     return(inStream
            .Where(x => MatchesPattern(x, factory.ResponsePattern))
            .Select(factory.ParseResponseBytes));
 }
Esempio n. 2
0
 public void SetBroadcastFlags(SetBroadcastFlagsRequest request)
 {
     SendRequestWithoutResponse(request);
     _ = Task.Run(async() => BroadcastFlags = await GetBroadcastFlags(new BroadcastFlagsRequest {
     }));
 }