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) )); }
public static void RaiseCompletedOnGroup(this Hub hub, string eventName, string groupName) { RxHelper.WithGroup(hub, groupName, clients => RxHelper.RaiseOnCompleted(eventName, clients)); }
public static void RaiseCompleted(this Hub hub, string eventName, string clientName) { RxHelper.WithClient(hub, clientName, clients => RxHelper.RaiseOnCompleted(eventName, clients)); }
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)); }
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)); }
public static void RaiseOnNextOnGroup <T>(this Hub hub, string eventName, string groupName, T payload) { RxHelper.WithGroup(hub, groupName, clients => RxHelper.RaiseOnNext(eventName, clients, payload)); }
public static void RaiseOnNext <T>(this Hub hub, string eventName, string clientName, T payload) { RxHelper.WithClient(hub, clientName, clients => RxHelper.RaiseOnNext(eventName, clients, payload)); }
public void OnCompletedOnGroup(string eventName, string groupName) { RxHelper.WithGroup <THub>(groupName, clients => RxHelper.RaiseOnCompleted(eventName, clients)); }
public void OnCompleted(string eventName, string clientName) { RxHelper.WithClient <THub>(clientName, clients => RxHelper.RaiseOnCompleted(eventName, clients)); }
public void OnErrorOnGroup(string eventName, Exception exception, string groupName) { RxHelper.WithGroup <THub>(groupName, clients => RxHelper.RaiseOnError(eventName, clients, exception)); }
public void OnError(string eventName, string clientName, Exception exception) { RxHelper.WithClient <THub>(clientName, clients => RxHelper.RaiseOnError(eventName, clients, exception)); }
public void OnNextOnGroup <T>(string eventName, T payload, string groupName) { RxHelper.WithGroup <THub>(groupName, clients => RxHelper.RaiseOnNext(eventName, clients, payload)); }
public void OnNext <T>(string eventName, string clientName, T payload) { RxHelper.WithClient <THub>(clientName, clients => RxHelper.RaiseOnNext(eventName, clients, payload)); }