C# Class UniversityChat.Chat.ChatChannels

Afficher le fichier Open project: jschefter/UniversityChat

Méthodes publiques

Méthode 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

Méthode 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 méthode

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

AddUserToRoom() public static méthode

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
Résultat void

DeleteRoom() public static méthode

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

GetRoomList() public static méthode

Get the names of all existing rooms.
public static GetRoomList ( ) : ICollection
Résultat ICollection

GetUsernamesInRoom() public static méthode

public static GetUsernamesInRoom ( string roomName ) : string[]
roomName string
Résultat string[]

GetUsersOfRoom() public static méthode

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.
Résultat ICollection

RemoveUserFromRoom() public static méthode

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
Résultat void