private static IObservable <ITraceEventHub> ConnectClient(this XafApplication application)
 {
     return(application.WhenCompatibilityChecked()
            .SelectMany(window => {
         var loggerHub = application is ILoggerHubClientApplication
                 ? application.ClientPortsList().ToObservable(Scheduler.Default)
                         .SelectMany(port => port.ConnectClient()
                                     .TakeUntil(application.WhenDisposed()))
                 : Observable.Empty <ITraceEventHub>();
         return loggerHub;
     })
            );
 }
示例#2
0
 public static IObservable <IPEndPoint> DetectServer(this XafApplication application) =>
 application.ClientPortsList().ToArray().Select(point => point).ToArray().Listening()
 .TraceRXLoggerHub(point => $"{point.Address}, {point.Port}");
 public static IObservable <IPEndPoint> DetectServer(this XafApplication application)
 {
     return(application.ClientPortsList().ToArray().Select(point => point).ToArray().Listening().TraceRXLoggerHub().Select(point => point));
 }