using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections;
public sealed class WhoseHandler
{
public static Hashtable objUser = new Hashtable();
public static int WhoseInn(int userId, string strUser)
{
int retVal = 0;
if (!(objUser.Contains(userId)))
{
objUser.Add(userId, strUser);
return retVal;
}
else
{
retVal = 1;
}
return retVal;
}
public static void WhoseOnline()
{
IDictionaryEnumerator whosOln = objUser.GetEnumerator();
while (whosOln.MoveNext())
{
HttpContext.Current.Response.Write(whosOln.Value + "<br>");
}
}
public static void RemoveUser(int userId)
{
if (objUser.Contains(userId))
{
objUser.Remove(userId);
}
}
}