public static MyHubContext AsMyHubContext <THub>(this IHubContext <THub> context) where THub : Hub { if (context == null) { throw new ArgumentNullException(nameof(context)); } var hubContext = new MyHubContext(); hubContext.Clients = context.Clients; hubContext.Groups = context.Groups; return(hubContext); }
protected BaseHubContextEvent(MyHubContext hubContext) { RaiseAt = DateHelper.Instance.GetDateNow(); Context = hubContext; }