public static void Example_ShowAttribute()
        {
            ReportingPlugin rp    = new ReportingPlugin();
            Type            t     = rp.GetType();
            var             attrs = t.GetCustomAttributes(false);

            foreach (var attr in attrs)
            {
                Console.WriteLine("Name:{0}", ((PluginInformationAttribute)attr).Name);
                Console.WriteLine("Auther:{0}", ((PluginInformationAttribute)attr).Auther);
                Console.WriteLine("Description:{0}", ((PluginInformationAttribute)attr).Description);
            }
        }
示例#2
0
 static void Main(string[] args)
 {
     //Compiler_Handled.Example_CallerInfo();
     ReportingPlugin.Example_ShowAttribute();
     Console.ReadLine();
 }