public void subscribe(string refid) { //Groups.g Add(Context.ConnectionId, userName); var con = connList.Find(c => c.ConnectionID == Context.ConnectionId); //agregar ref al connection list con.RefId = refid; var fromDate = DateTime.Parse("01/01/2018"); var list = HubContextHelper.GetCasesMessages(con.CustomerId, fromDate, refid, Guid.Parse(con.SubscriptionId)); }
/// <summary> /// registrar el cliente /// </summary> /// <param name="customerId"></param> /// <param name="linkChannelId"></param> /// <param name="userName"></param> public void register(string customerId, Guid linkChannelId, string userName) { var fromDate = DateTime.Parse("01/01/2018"); Groups.Add(Context.ConnectionId, userName); var conn = connList.Find(c => c.ConnectionID == Context.ConnectionId); conn.CustomerId = customerId; conn.Name = userName; conn.SubscriptionId = HubContextHelper.GetCases(customerId, linkChannelId, userName); //envio los casos disponibles para seleccionar SendCases(HubContextHelper.GetCasesMessages(customerId, fromDate, string.Empty, Guid.Parse(conn.SubscriptionId)), userName); }