Microsoft.VisualStudio.Project.EnumConnectionPoints.Next C# (CSharp) Method

Next() public method

public Next ( uint cConnections, Microsoft.VisualStudio.OLE.Interop.IConnectionPoint ppCP, uint &pcFetched ) : int
cConnections uint
ppCP Microsoft.VisualStudio.OLE.Interop.IConnectionPoint
pcFetched uint
return int
        public virtual int Next(uint cConnections, IConnectionPoint[] ppCP, out uint pcFetched)
        {
            pcFetched = 0;

            if (ppCP == null || ppCP.Length < cConnections)
                return VSConstants.E_INVALIDARG;

            int remaining = _connectionPoints.Count - _currentIndex;
            pcFetched = checked((uint)Math.Min(cConnections, remaining));
            for (int i = 0; i < pcFetched; i++)
                ppCP[i] = _connectionPoints[_currentIndex + i];

            _currentIndex += (int)pcFetched;
            return pcFetched == cConnections ? VSConstants.S_OK : VSConstants.S_FALSE;
        }