private void RegisterPlugin(Type type)
        {
            var pi = new PluginInfo
            {
                Type    = type,
                Visible = true
            };

            var attr     = type.GetCustomAttributes(typeof(PluginAttribute), true).FirstOrDefault() as PluginAttribute;
            var descAttr = type.GetCustomAttributes(typeof(DescriptionAttribute), true).FirstOrDefault() as DescriptionAttribute;

            if (attr == null)
            {
                pi.RefreshInterval = -1;
                pi.Name            = pi.Type.Name;
            }
            else
            {
                pi.RefreshInterval = attr.RefreshInterval;
                pi.Name            = attr.Name;
            }

            if (descAttr != null)
            {
                pi.Description = descAttr.Description;
            }

            pi.Settings = SettingInfo.Generate(pi.Type).OrderBy(s => s.PropertyInfo.Name).ToArray();
            this.registeredPlugins.TryAdd(type, pi);
            Program.WriteLog("Registering plugin: {0}", type);
        }