Exemplo n.º 1
0
        public static void SetupEnumMarkers(this Mock <IVsTextLines> mock, IVsEnumLineMarkers markers)
        {
            var local = markers;

            mock
            .Setup(x => x.EnumMarkers(
                       It.IsAny <int>(),
                       It.IsAny <int>(),
                       It.IsAny <int>(),
                       It.IsAny <int>(),
                       It.IsAny <int>(),
                       It.IsAny <uint>(),
                       out local))
            .Returns(VSConstants.S_OK);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Don't be tempted to make this an IEnumerable because multiple calls would not
        /// produce multiple enumerations since the parameter would need to be reset
        /// </summary>
        public static List <IVsTextLineMarker> GetAll(this IVsEnumLineMarkers markers)
        {
            var list = new List <IVsTextLineMarker>();

            do
            {
                var hresult = markers.Next(out IVsTextLineMarker marker);
                if (ErrorHandler.Succeeded(hresult) && marker != null)
                {
                    list.Add(marker);
                }
                else
                {
                    break;
                }
            } while (true);

            return(list);
        }
 public int EnumMarkers(int iStartLine, int iStartIndex, int iEndLine, int iEndIndex, int iMarkerType, uint dwFlags, out IVsEnumLineMarkers ppEnum)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 4
0
 int IVsTextLines.EnumMarkers(int iStartLine,
             int iStartIndex,
             int iEndLine,
             int iEndIndex,
             int iMarkerType,
             uint dwFlags,
             out IVsEnumLineMarkers ppEnum
     )
 {
     ppEnum = null;
     return VSConstants.E_NOTIMPL;
 }
Exemplo n.º 5
0
 public int EnumMarkers(int iStartLine, int iStartIndex, int iEndLine, int iEndIndex, int iMarkerType, uint dwFlags, out IVsEnumLineMarkers ppEnum)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 6
0
 public int EnumMarkers(
     int iStartLine, int iStartIndex, int iEndLine, int iEndIndex, int iMarkerType, uint dwFlags, out IVsEnumLineMarkers ppEnum)
 {
     return(_textBuffer.EnumMarkers(iStartLine, iStartIndex, iEndLine, iEndIndex, iMarkerType, dwFlags, out ppEnum));
 }
Exemplo n.º 7
0
 public int EnumMarkers(int iStartLine, int iStartIndex, int iEndLine, int iEndIndex, int iMarkerType, uint dwFlags, out IVsEnumLineMarkers ppEnum) {
     throw new NotImplementedException();
 }
Exemplo n.º 8
0
 public int EnumMarkers(int iStartLine, int iStartIndex, int iEndLine, int iEndIndex, int iMarkerType, uint dwFlags, out IVsEnumLineMarkers ppEnum)
 {
     ppEnum = null;
     return VSConstants.S_OK;
 }
Exemplo n.º 9
0
 public int EnumMarkers(int iStartLine, int iStartIndex, int iEndLine, int iEndIndex, int iMarkerType, uint dwFlags, out IVsEnumLineMarkers ppEnum)
 {
     ppEnum = null;
     return(VSConstants.S_OK);
 }
Exemplo n.º 10
0
 /// <summary>
 /// The enum markers.
 /// </summary>
 /// <param name="iStartLine">
 /// The i start line.
 /// </param>
 /// <param name="iStartIndex">
 /// The i start index.
 /// </param>
 /// <param name="iEndLine">
 /// The i end line.
 /// </param>
 /// <param name="iEndIndex">
 /// The i end index.
 /// </param>
 /// <param name="iMarkerType">
 /// The i marker type.
 /// </param>
 /// <param name="dwFlags">
 /// The dw flags.
 /// </param>
 /// <param name="ppEnum">
 /// The pp enum.
 /// </param>
 /// <returns>
 /// The enum markers.
 /// </returns>
 /// <exception cref="Exception">
 /// </exception>
 public int EnumMarkers(int iStartLine, int iStartIndex, int iEndLine, int iEndIndex, int iMarkerType, uint dwFlags, out IVsEnumLineMarkers ppEnum)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 11
0
 public int EnumMarkers(
     int iStartLine, int iStartIndex, int iEndLine, int iEndIndex, int iMarkerType, uint dwFlags, out IVsEnumLineMarkers ppEnum)
 {
     return _textBuffer.EnumMarkers(iStartLine, iStartIndex, iEndLine, iEndIndex, iMarkerType, dwFlags, out ppEnum);
 }