C# Class UniversityChat.Chat.ChatChannels

Show file Open project: jschefter/UniversityChat

Public Methods

Method Description
AddRoom ( string roomName ) : void

adds a new room to the rooms repository.

AddUserToRoom ( string roomName, User user ) : void

Add a user to an existing room

DeleteRoom ( string roomName ) : void

delete a room from the rooms repository.

GetRoomList ( ) : ICollection

Get the names of all existing rooms.

GetUsernamesInRoom ( string roomName ) : string[]
GetUsersOfRoom ( string roomName ) : ICollection

gets the users currently connected to a room.

RemoveUserFromRoom ( string roomName, User user ) : void

Remove a user from an existing room.

Private Methods

Method Description
GetRoomByName ( string channelName ) : System.Guid
GetRoomNamesThatUserIsConnectedTo ( User user ) : ICollection

gets the names of the rooms a particular user is connected to.

Method Details

AddRoom() public static method

adds a new room to the rooms repository.
public static AddRoom ( string roomName ) : void
roomName string the name of the room to be added
return void

AddUserToRoom() public static method

Add a user to an existing room
public static AddUserToRoom ( string roomName, User user ) : void
roomName string the name of the room the user is being added to.
user UniversityChat.Model.User the user being added to room
return void

DeleteRoom() public static method

delete a room from the rooms repository.
public static DeleteRoom ( string roomName ) : void
roomName string the name of the room to be deleted
return void

GetRoomList() public static method

Get the names of all existing rooms.
public static GetRoomList ( ) : ICollection
return ICollection

GetUsernamesInRoom() public static method

public static GetUsernamesInRoom ( string roomName ) : string[]
roomName string
return string[]

GetUsersOfRoom() public static method

gets the users currently connected to a room.
public static GetUsersOfRoom ( string roomName ) : ICollection
roomName string the name of the room that user names should be gotten for.
return ICollection

RemoveUserFromRoom() public static method

Remove a user from an existing room.
public static RemoveUserFromRoom ( string roomName, User user ) : void
roomName string the name of the room the user is being removed from.
user UniversityChat.Model.User the user
return void