public static void AddDefaultMessages(IMessageRegistry registry)
 {
     registry.Add <ShowMessage>();
     registry.Add <HideMessage>();
     registry.Add <WindowShownMessage>();
     registry.Add <ActionsMessage>();
 }
 public static void Add<T>(this IMessageRegistry registry)
     where T: Message, new()
 {
     foreach (var attr in typeof(T).GetCustomAttributes<MessageNameAttribute>())
     {
         registry.Add<T>(attr.Name);
     }
 }