/// <summary> /// Create local class interfaces /// </summary> public void CreateLocalClassInterfaces(ConverterInfo converterInfo) { // Walk the candidate list and generate class interfaces // Note: We need to create the class interface in two phases because // during creation of class interface, we'll need to create interface & event interface, which // could have parameters resolve back to coclass which requires certain class interface // So split into two stages so that when we are doing creation all necessary information are inplace var convClassInterfaceLocals = new List<ConvClassInterfaceLocal>(); // // Phase 1 : Create ConvClassInterfaceLocal instances and associate interface with class interfaces // foreach (DefaultInterfaceInfo info in m_defaultInterfaceInfoList) { try { ConvClassInterfaceLocal local = new ConvClassInterfaceLocal( converterInfo, info.coclass, info.defaultInterface, info.defaultSourceInterface, info.isExclusive); convClassInterfaceLocals.Add(local); } catch (ReflectionTypeLoadException) { throw; // Fatal failure. Throw } catch (TlbImpResolveRefFailWrapperException) { throw; // Fatal failure. Throw } catch (TlbImpGeneralException) { throw; // Fatal failure. Throw } catch (TypeLoadException) { throw; // TypeLoadException is critical. Throw. } catch (Exception) { } } // // Phase 2 : Create the class interface // foreach (ConvClassInterfaceLocal local in convClassInterfaceLocals) { try { local.Create(); } catch (ReflectionTypeLoadException) { throw; // Fatal failure. Throw } catch (TlbImpResolveRefFailWrapperException) { throw; // Fatal failure. Throw } catch (TlbImpGeneralException) { throw; // Fatal failure. Throw } catch (TypeLoadException) { throw; // TypeLoadException is critical. Throw. } catch (Exception) { } } }
/// <summary> /// Create local class interfaces /// </summary> public void CreateLocalClassInterfaces(ConverterInfo converterInfo) { // Walk the candidate list and generate class interfaces // Note: We need to create the class interface in two phases because // during creation of class interface, we'll need to create interface & event interface, which // could have parameters resolve back to coclass which requires certain class interface // So split into two stages so that when we are doing creation all necessary information are inplace List <ConvClassInterfaceLocal> convClassInterfaceLocals = new List <ConvClassInterfaceLocal>(); // // Phase 1 : Create ConvClassInterfaceLocal instances and associate interface with class interfaces // foreach (DefaultInterfaceInfo info in m_defaultInterfaceInfoList) { try { ConvClassInterfaceLocal local = new ConvClassInterfaceLocal( converterInfo, info.coclass, info.defaultInterface, info.defaultSourceInterface, info.isExclusive); convClassInterfaceLocals.Add(local); } catch (ReflectionTypeLoadException) { throw; // Fatal failure. Throw } catch (TlbImpResolveRefFailWrapperException) { throw; // Fatal failure. Throw } catch (TlbImpGeneralException) { throw; // Fatal failure. Throw } catch (TypeLoadException) { throw; // TypeLoadException is critical. Throw. } catch (Exception) { } } // // Phase 2 : Create the class interface // foreach (ConvClassInterfaceLocal local in convClassInterfaceLocals) { try { local.Create(); } catch (ReflectionTypeLoadException) { throw; // Fatal failure. Throw } catch (TlbImpResolveRefFailWrapperException) { throw; // Fatal failure. Throw } catch (TlbImpGeneralException) { throw; // Fatal failure. Throw } catch (TypeLoadException) { throw; // TypeLoadException is critical. Throw. } catch (Exception) { } } }