internal static HandlerTrackingInformation Create(Handler parser, Type parserType, ModuleTrackingInformation moduleTrackingInformation)
 {
     var information = new HandlerTrackingInformation
                       {
                           SingletonHandler = parser,
                           Type = parserType,
                           ModuleTrackingInformation = moduleTrackingInformation
                       };
     parser.HandlerTrackingInformation = information;
     var attribute = AttributeReader.ReadTypeAttribute<HandlerMetadataAttribute>(parser);
     if (attribute == null)
     {
         throw new InvalidOperationException(string.Format("Handler missing HandlerMetadataAttribute ({0}).", parserType.FullName));
     }
     information.Name = attribute.Name.ToUpper();
     information.ParentNameList = attribute.ParentNameList;
     return information;
 }
 public static ModuleTrackingInformation Create(Module module, Type moduleType)
 {
     var information = new ModuleTrackingInformation
                       {
                           Module = module,
                           Type = moduleType,
                           Namespace = moduleType.Namespace
                       };
     module.ModuleTrackingInformation = information;
     var attribute = AttributeReader.ReadAssemblyAttribute<AssemblyModuleAttribute>(module);
     if (attribute == null)
     {
         throw new InvalidOperationException(string.Format("Module missing AssemblyModuleAttribute ({0}).", moduleType.FullName));
     }
     module.Name = attribute.Name.ToUpper();
     //var attribute = AttributeReader.ReadTypeAttribute<ModuleMetadataAttribute>(module);
     //if (attribute == null)
     //{
     //    throw new InvalidOperationException(string.Format("Module missing ModuleMetadataAttribute ({0}).", moduleType.FullName));
     //}
     //module.Name = attribute.Name.ToUpper();
     return information;
 }