コード例 #1
0
        public IDisposable Observable <THub>(string eventName, string clientName) where THub : Hub, new()
        {
            dynamic clients = string.IsNullOrEmpty(clientName) ? RxHelper.GetHubClients <THub>() : RxHelper.GetHubClient <THub>(clientName);

            return(_observable.Subscribe(
                       x => RxHelper.RaiseOnNext(eventName, clients, x),
                       x => RxHelper.RaiseOnError(eventName, clients, x),
                       () => RxHelper.RaiseOnCompleted(eventName, clients)
                       ));
        }
コード例 #2
0
 public static void RaiseCompletedOnGroup(this Hub hub, string eventName, string groupName)
 {
     RxHelper.WithGroup(hub, groupName, clients => RxHelper.RaiseOnCompleted(eventName, clients));
 }
コード例 #3
0
 public static void RaiseCompleted(this Hub hub, string eventName, string clientName)
 {
     RxHelper.WithClient(hub, clientName, clients => RxHelper.RaiseOnCompleted(eventName, clients));
 }
コード例 #4
0
 public static void RaiseOnErrorOnGroup <T>(this Hub hub, string eventName, string groupName, T payload) where T : Exception
 {
     RxHelper.WithGroup(hub, groupName, clients => RxHelper.RaiseOnError(eventName, clients, payload));
 }
コード例 #5
0
 public static void RaiseOnError <T>(this Hub hub, string eventName, string clientName, T payload) where T : Exception
 {
     RxHelper.WithClient(hub, clientName, clients => RxHelper.RaiseOnError(eventName, clients, payload));
 }
コード例 #6
0
 public static void RaiseOnNextOnGroup <T>(this Hub hub, string eventName, string groupName, T payload)
 {
     RxHelper.WithGroup(hub, groupName, clients => RxHelper.RaiseOnNext(eventName, clients, payload));
 }
コード例 #7
0
 public static void RaiseOnNext <T>(this Hub hub, string eventName, string clientName, T payload)
 {
     RxHelper.WithClient(hub, clientName, clients => RxHelper.RaiseOnNext(eventName, clients, payload));
 }
コード例 #8
0
 public void OnCompletedOnGroup(string eventName, string groupName)
 {
     RxHelper.WithGroup <THub>(groupName, clients => RxHelper.RaiseOnCompleted(eventName, clients));
 }
コード例 #9
0
 public void OnCompleted(string eventName, string clientName)
 {
     RxHelper.WithClient <THub>(clientName, clients => RxHelper.RaiseOnCompleted(eventName, clients));
 }
コード例 #10
0
 public void OnErrorOnGroup(string eventName, Exception exception, string groupName)
 {
     RxHelper.WithGroup <THub>(groupName, clients => RxHelper.RaiseOnError(eventName, clients, exception));
 }
コード例 #11
0
 public void OnError(string eventName, string clientName, Exception exception)
 {
     RxHelper.WithClient <THub>(clientName, clients => RxHelper.RaiseOnError(eventName, clients, exception));
 }
コード例 #12
0
 public void OnNextOnGroup <T>(string eventName, T payload, string groupName)
 {
     RxHelper.WithGroup <THub>(groupName, clients => RxHelper.RaiseOnNext(eventName, clients, payload));
 }
コード例 #13
0
 public void OnNext <T>(string eventName, string clientName, T payload)
 {
     RxHelper.WithClient <THub>(clientName, clients => RxHelper.RaiseOnNext(eventName, clients, payload));
 }