Callback notation in a Mediator
What about making the Register method generic?

public class Mediator
{
    private Dictionary&lt;Messages, Action&lt;object&gt;&gt; registeredCallback =
        new Dictionary&lt;Messages, Action&lt;object&gt;&gt;();

    public void Register&lt;TParam&gt;(Messages message, Action&lt;TParam&gt; callback)
    {
        registeredCallback[message] = p =&gt; callback((TParam)p);
    }

    public void Notify(Messages message, object parameter)
    {
        callback(parameter);
    }
}


The typecasting is done inside the Register method, making it invisible to any class using it.

You can also change signature of the GreetUser method so that it takes a User instead of a string as a parameter. By doing so you can call Register like this:

mediator.Register&lt;User&gt;(Messages.UserCreated, GreetUser);