Return to Snippet

Revision: 2925
at May 9, 2007 15:43 by rengber


Initial Code
System.Reflection.Assembly assy = System.Reflection.Assembly.LoadFile(fileName);
  Type[] publicTypes = assy.GetExportedTypes();
  foreach (Type t in publicTypes)
  {
    if (t.BaseType.Name == "Installer")
    {
      MessageBox.Show(t.Name);
      Installer o = (Installer)t.Assembly.CreateInstance(t.FullName);
      foreach (Installer i in o.Installers)
      {
        if (i.GetType().Name == "PerformanceCounterInstaller")
        {
          MessageBox.Show("Performance Counter Installer Found in Assembly " + fileName); 
        }
      }
    }
  }

Initial URL


Initial Description


Initial Title
Scan Assemblies Using Reflection to Locate Performance Counter Installers

Initial Tags


Initial Language
C#