public int Connect(string name) { ServerUser user = new ServerUser { ID = nextID, Name = name, operationContext = OperationContext.Current }; nextID++; SendMsg(user.Name + " подключился к чату!", 0); users.Add(user); return(user.ID); }
public int Connect(string name) { ServerUser user = new ServerUser() { Id = nextId, Name = name, operationContext = OperationContext.Current }; nextId++; SendMssage(user.Name + ": подключился к чату", nextId); users.Add(user); return(user.Id); }
public int Connect(string name) { ServerUser user = new ServerUser() { ID = nextID, Name = name, operationContext = OperationContext.Current }; nextID++; SendMsg("| " + user.Name + " connected.", 0); users.Add(user); return(user.ID); }