internal ComTypeBrowserInfo(ITypeInfo typeInfo, TypeLibraryNamespaceBrowserInfo ns) { Debug.Assert(typeInfo != null && ns != null, "typeInfo != null && ns != null"); m_typeInfo = new ComTypeWrapper(typeInfo); m_namespace = ns; }
private static int CompareTypeNames(ComTypeWrapper a, ComTypeWrapper b) { // Compare the names with case-insensitive comparison first (for ordering purposes) string nameA = Marshal.GetTypeInfoName(a.ComType); string nameB = Marshal.GetTypeInfoName(b.ComType); int result = string.Compare(nameA, nameB, true); if (result != 0) { return(result); } // Now do a case-sensitive comparison - if this returns 0 then it's really the same type return(string.Compare(nameA, nameB, false)); }
public void Dispose() { if (m_typeInfo != null) { m_typeInfo.Dispose(); m_typeInfo = null; } if (m_baseTypes != null) { foreach (ComTypeBrowserInfo baseType in m_baseTypes.Keys) { baseType.Dispose(); } m_baseTypes = null; } m_namespace = null; }