I have been trying building application that receive notification on real time basis using SignalR
. Now I have some application which send notifications with user id to my application and I am storing that data in dictionary. Now to receive those notification I need to pick only those entries from dictionary which equal to my login user id. How can I do this as session variable not accessible in class
Following is my Send function that calls to broadcast message
public void Send(string name, string message)
{
SortedDictionary<int, string> dicMessage = new SortedDictionary<int, string>();
if (!dicMessage .ContainsKey(nUserID))
{
m_hs.Add(nUserID, message);
}
}
and here my Receive function
public void Receive(string strSessionID)
{
// here I need to first check my user ID but not available
}