Esempio n. 1
0
        static private bool getParameterInfo(IVsXMLMemberIndex file, string xml, IList <string> names, IList <string> descriptions)
        {
            //Microsoft.VisualStudio.Shell.ThreadHelper.ThrowIfNotOnUIThread();
            IVsXMLMemberData data = null;
            var result            = file.GetMemberDataFromXML(xml, out data);
            int numparams         = 0;

            if (result >= 0 && data != null)
            {
                result = data.GetParamCount(out numparams);
            }
            if (result >= 0 && numparams != 0)
            {
                string paramName;
                string paramDesc;
                for (int i = 0; i < numparams; i++)
                {
                    result = data.GetParamTextAt(i, out paramName, out paramDesc);
                    names.Add(paramName);
                    paramDesc = CleanUpResult(paramDesc);
                    descriptions.Add(paramDesc);
                }
            }
            return(true);
        }
Esempio n. 2
0
        static private string getSummary(IVsXMLMemberIndex file, string xml, out string returns, out string remarks)
        {
            string summary = "";

            returns = remarks = "";
            IVsXMLMemberData data = null;
            var result            = file.GetMemberDataFromXML(xml, out data);

            if (result >= 0 && data != null)
            {
                result = data.GetSummaryText(out summary);
                result = data.GetReturnsText(out returns);
                result = data.GetRemarksText(out remarks);
            }
            summary = CleanUpResult(summary);
            returns = CleanUpResult(returns);
            remarks = CleanUpResult(remarks);
            return(summary);
        }