private string GetTextFromTag(object tag)
        {
            var type  = tag as Type;
            var proxy = tag as NdrComProxyDefinition;
            NdrComplexTypeReference str = tag as NdrComplexTypeReference;

            if (type != null)
            {
                return(COMUtilities.FormatComType(type));
            }
            else if (proxy != null)
            {
                INdrFormatter formatter = DefaultNdrFormatter.Create(m_iids_to_names, COMUtilities.DemangleWinRTName);
                return(formatter.FormatComProxy(proxy));
            }
            else if (str != null)
            {
                INdrFormatter formatter = DefaultNdrFormatter.Create(m_iids_to_names);
                return(formatter.FormatComplexType(str));
            }

            return(String.Empty);
        }
Esempio n. 2
0
        private string GetTextFromTag(object tag)
        {
            var type  = tag as Type;
            var proxy = tag as NdrComProxyDefinition;
            NdrComplexTypeReference str = tag as NdrComplexTypeReference;

            if (type != null)
            {
                return(COMUtilities.FormatComType(type));
            }
            else if (proxy != null)
            {
                INdrFormatter formatter = GetNdrFormatter(true);
                return(formatter.FormatComProxy(proxy));
            }
            else if (str != null)
            {
                INdrFormatter formatter = GetNdrFormatter(false);
                return(formatter.FormatComplexType(str));
            }

            return(String.Empty);
        }