Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 protected BaseHubContextEvent(MyHubContext hubContext)
 {
     RaiseAt = DateHelper.Instance.GetDateNow();
     Context = hubContext;
 }