/// <summary>
        /// 注册消息
        /// </summary>
        public void RegistAll()
        {
            var types = AppDomain.CurrentDomain.GetAssemblies()
                        .SelectMany(a => a.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(IMessageManager))))
                        .ToArray();

            foreach (var v in types)
            {
                object       obj     = Activator.CreateInstance(v);
                MethodInfo[] methods = obj.GetType().GetMethods();
                foreach (var item in methods)
                {
                    RegistMethodAttribute attribute = item.GetCustomAttribute <RegistMethodAttribute>();
                    if (attribute != null)
                    {
                        if (attribute.Token == null)
                        {
                            Messenger.Default.Register(obj, item.Name, item);
                        }
                        else
                        {
                            Messenger.Default.Register(obj, attribute.Token, item);
                        }
                    }
                }
            }
        }
 public void RegistObject(object obj)
 {
     MethodInfo[] methods = obj.GetType().GetMethods();
     foreach (var item in methods)
     {
         RegistMethodAttribute attribute = item.GetCustomAttribute <RegistMethodAttribute>();
         if (attribute != null)
         {
             if (attribute.Token == null)
             {
                 Messenger.Default.Register(obj, item.Name, item);
             }
             else
             {
                 Messenger.Default.Register(obj, attribute.Token, item);
             }
         }
     }
 }