Ejemplo n.º 1
0
 public static void SendData(Guid applicationId, List <string> feedIds, RealTimeAction actionName, string jsonString)
 {
     foreach (string f in feedIds)
     {
         SendData(applicationId, f, actionName, jsonString);
     }
 }
Ejemplo n.º 2
0
        public static void SendData(Guid applicationId, string feedId, RealTimeAction actionName, string jsonString)
        {
            if (!RaaiVanSettings.RealTime(applicationId) || string.IsNullOrEmpty(feedId))
            {
                return;
            }

            feedId = feedId.ToLower();
            string name = actionName.ToString().ToLower();

            if (!Feeds.ContainsKey(feedId) || !Feeds[feedId].ContainsKey(name))
            {
                return;
            }

            IHubContext context = GlobalHost.ConnectionManager.GetHubContext <RaaiVanHub>();

            foreach (string connId in Feeds[feedId][name])
            {
                if (ConnectedUsers.ContainsKey(connId))
                {
                    context.Clients.Client(connId).GetData(name, jsonString);
                }
            }
        }
Ejemplo n.º 3
0
        public static void SendData(Guid applicationId, List <Guid> userIds, RealTimeAction actionName, string jsonString)
        {
            if (!RaaiVanSettings.RealTime(applicationId) || userIds == null)
            {
                return;
            }
            string name = actionName.ToString().ToLower();

            IHubContext context = GlobalHost.ConnectionManager.GetHubContext <RaaiVanHub>();

            foreach (Guid uId in userIds.Distinct())
            {
                if (!UserConnectionsDic.ContainsKey(uId))
                {
                    continue;
                }

                foreach (string connId in UserConnectionsDic[uId])
                {
                    if (ConnectedUsers.ContainsKey(connId) && ConnectedUsers[connId].Events.Any(u => u == name))
                    {
                        context.Clients.Client(connId).GetData(name, jsonString);
                    }
                }
            }
        }
Ejemplo n.º 4
0
        public virtual int _GetUniqueIdentifier()
        {
            var hashCode = 399326290;

            hashCode = hashCode * -1521134295 + (TransportDetailsID?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (EventID?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Qty?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (ExtDateStart?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (ExtTimeStart?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (ExtTimeAction?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (RealDateStart?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (RealTimeStart?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (RealTimeAction?.GetHashCode() ?? 0);
            return(hashCode);
        }
Ejemplo n.º 5
0
 public static void SendData(Guid applicationId, Guid userId, RealTimeAction actionName, string jsonString)
 {
     SendData(applicationId, new List <Guid> {
         userId
     }, actionName, jsonString);
 }