private static Action CreateRemoteSubscription(IAsyncReactiveQbservable <T> source, Uri uri)
                {
                    var observer = source.Provider.CreateQbserver <Uri, T>(
                        Expression.Parameter(typeof(Uri)).Let(u =>
                                                              Expression.Lambda <Func <Uri, IAsyncReactiveQbserver <T> > >(
                                                                  Expression.Invoke(
                                                                      Expression.Parameter(
                                                                          typeof(Func <Uri, IAsyncReactiveQbserver <T> >),
                                                                          Platform.Constants.Identifiers.Observer.FireHose.String
                                                                          ),
                                                                      u
                                                                      ),
                                                                  u
                                                                  )
                                                              )
                        );

                    var sub = source.SubscribeAsync(observer(uri), uri, null, CancellationToken.None).Result;

                    return(() => sub.DisposeAsync(CancellationToken.None).Wait());
                }
 public Task <IAsyncReactiveQubscription> SubscribeAsync(IAsyncReactiveQbserver <T> observer, Uri subscriptionUri, object state, CancellationToken token)
 {
     _testClient.CleanupEntity(subscriptionUri, ReactiveEntityType.Subscription);
     return(_inner.SubscribeAsync(observer, subscriptionUri, state, token));
 }