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