static bool TryGetComClassType(CLSID clsId, out ComAPI.IClassFactory factory) { // Check among the persistently registered classes foreach (ExcelComClassType comClass in registeredComClassTypes) { if (comClass.ClsId == clsId) { factory = new ClassFactory(comClass); return(true); } } factory = null; return(false); }
internal static void RegisterClassFactory(CLSID clsId, ComAPI.IClassFactory classFactory) { // CONSIDER: Do we need to deal with the case where it is already in the list? // For now we expect it to throw... registeredClassFactories.Add(clsId, classFactory); }