Esempio n. 1
0
        public PluginInformation(IPluginStartup startup, Type pluginType)
        {
            _attribute = pluginType.GetCustomAttribute <ImpostorPluginAttribute>();

            Startup    = startup;
            PluginType = pluginType;
        }
Esempio n. 2
0
        public PluginInformation(IPluginStartup?startup, Type pluginType)
        {
            _attribute = pluginType.GetCustomAttribute <ImpostorPluginAttribute>() !;

            Dependencies = pluginType.GetCustomAttributes <ImpostorDependencyAttribute>().Select(t => new DependencyInformation(t)).ToList();
            Startup      = startup;
            PluginType   = pluginType;
        }
Esempio n. 3
0
        public PluginInformation(IPluginStartup?startup, Type pluginType)
        {
            _attribute = pluginType.GetCustomAttribute <ImpostorPluginAttribute>() !;

            var assembly = pluginType.Assembly;

            Name    = _attribute.Name ?? assembly.GetCustomAttribute <AssemblyTitleAttribute>()?.Title ?? assembly.GetName().Name !;
            Author  = _attribute.Author ?? assembly.GetCustomAttribute <AssemblyCompanyAttribute>()?.Company ?? string.Empty;
            Version = _attribute.Version ?? assembly.GetCustomAttribute <AssemblyInformationalVersionAttribute>()?.InformationalVersion ?? assembly.GetName().Version !.ToString();

            Dependencies = pluginType.GetCustomAttributes <ImpostorDependencyAttribute>().Select(t => new DependencyInformation(t)).ToList();
            Startup      = startup;
            PluginType   = pluginType;
        }