private static IEnumerable <ListViewItem> FormatProxyInstanceComplexTypes(COMProxyInstance proxy)
 {
     foreach (var type in proxy.ComplexTypes.OrderBy(p => p.Name))
     {
         ListViewItem item = new ListViewItem(type.Name);
         item.Tag = type;
         yield return(item);
     }
 }
 internal COMProxyInstanceEntry(COMProxyInstance instance, string name, Guid iid, Guid base_iid, int dispatch_count, NdrProcedureDefinition[] procs)
 {
     _instance     = instance;
     Name          = COMUtilities.DemangleWinRTName(name);
     Iid           = iid;
     BaseIid       = base_iid == Guid.Empty ? COMInterfaceEntry.IID_IUnknown : base_iid;
     DispatchCount = dispatch_count;
     Procs         = procs;
 }
示例#3
0
 private static IEnumerable <ListViewItemWithIid> FormatProxyInstance(COMProxyInstance proxy)
 {
     foreach (COMProxyInstanceEntry t in proxy.Entries.OrderBy(t => t.Name))
     {
         ListViewItemWithIid item = new ListViewItemWithIid(t.Name, t.Iid);
         item.SubItems.Add(t.Iid.FormatGuid());
         item.Tag = t;
         yield return(item);
     }
 }
示例#4
0
 private static IEnumerable <ListViewItemWithGuid> FormatProxyInstance(COMProxyInstance proxy)
 {
     foreach (var t in proxy.Entries.OrderBy(t => COMUtilities.DemangleWinRTName(t.Name)))
     {
         ListViewItemWithGuid item = new ListViewItemWithGuid(COMUtilities.DemangleWinRTName(t.Name), t.Iid);
         item.SubItems.Add(t.Iid.FormatGuid());
         item.Tag = t;
         yield return(item);
     }
 }
 public static COMProxyInstance GetFromFile(string path)
 {
     if (m_proxies_by_file.ContainsKey(path))
     {
         return(m_proxies_by_file[path]);
     }
     else
     {
         COMProxyInstance proxy = new COMProxyInstance(path);
         m_proxies_by_file[path] = proxy;
         return(proxy);
     }
 }
 public static COMProxyInstance GetFromCLSID(COMCLSIDEntry clsid)
 {
     if (m_proxies.ContainsKey(clsid.Clsid))
     {
         return(m_proxies[clsid.Clsid]);
     }
     else
     {
         COMProxyInstance proxy = new COMProxyInstance(clsid);
         m_proxies[clsid.Clsid] = proxy;
         return(proxy);
     }
 }
示例#7
0
 public TypeLibControl(COMRegistry registry, string name, COMProxyInstance proxy, Guid guid_to_view)
     : this(registry.InterfacesToNames, proxy.ComplexTypesWithNames, name, guid_to_view,
            FormatProxyInstance(proxy),
            new ListViewItemWithGuid[0], FormatProxyInstanceComplexTypes(proxy), new ListViewItem[0])
 {
 }