VsTeXProject.VisualStudio.Project.ProjectConfig.get_OutputGroups C# (CSharp) Метод

get_OutputGroups() публичный Метод

public get_OutputGroups ( uint celt, IVsOutputGroup rgpcfg, uint pcActual ) : int
celt uint
rgpcfg IVsOutputGroup
pcActual uint
Результат int
        public virtual int get_OutputGroups(uint celt, IVsOutputGroup[] rgpcfg, uint[] pcActual)
        {
            // Are they only asking for the number of groups?
            if (celt == 0)
            {
                if ((null == pcActual) || (0 == pcActual.Length))
                {
                    throw new ArgumentNullException("pcActual");
                }
                pcActual[0] = (uint) OutputGroups.Count;
                return VSConstants.S_OK;
            }

            // Check that the array of output groups is not null
            if ((null == rgpcfg) || (rgpcfg.Length == 0))
            {
                throw new ArgumentNullException("rgpcfg");
            }

            // Fill the array with our output groups
            uint count = 0;
            foreach (var group in OutputGroups)
            {
                if (rgpcfg.Length > count && celt > count && group != null)
                {
                    rgpcfg[count] = group;
                    ++count;
                }
            }

            if (pcActual != null && pcActual.Length > 0)
                pcActual[0] = count;

            // If the number asked for does not match the number returned, return S_FALSE
            return count == celt ? VSConstants.S_OK : VSConstants.S_FALSE;
        }