private void CacheTargets(Assembly assm)
{
foreach(Type t in assm.GetTypes())
{
TargetAttribute ta = (TargetAttribute)Helper.CheckType(t, typeof(TargetAttribute), typeof(ITarget));
if(ta == null)
continue;
if (t.IsAbstract)
continue;
ITarget target = (ITarget)assm.CreateInstance(t.FullName);
if (target == null)
{
throw new MissingMethodException("Could not create ITarget instance");
}
m_Targets[ta.Name] = target;
}
}