Mid From PDF GoF Patterns Gang of Four Patterns

Mediator Interface (IChatMediator):?

  • The IChatMediator interface defines two key operations:

■ SendMessage(string message, User user): Sends a

message from a user to all other registered users.

■ RegisterUser(User user): Registers users with the mediator so

they can send and receive messages.

public interface IChatMediator
{

void SendMessage(string message, User user);

void RegisterUser(User user);

}

More from Design Patterns in C#

All questions for this course
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details