Condividi tramite


ITextSearchService2.FindAll Method (SnapshotSpan, SnapshotPoint, String, FindOptions)

Searches for all occurrences of the given search pattern, using the given search range, starting position and options.

Namespace:  Microsoft.VisualStudio.Text.Operations
Assembly:  Microsoft.VisualStudio.Text.Logic (in Microsoft.VisualStudio.Text.Logic.dll)

Syntax

'Declaration
Function FindAll ( _
    searchRange As SnapshotSpan, _
    startingPosition As SnapshotPoint, _
    searchPattern As String, _
    options As FindOptions _
) As IEnumerable(Of SnapshotSpan)
IEnumerable<SnapshotSpan> FindAll(
    SnapshotSpan searchRange,
    SnapshotPoint startingPosition,
    string searchPattern,
    FindOptions options
)
IEnumerable<SnapshotSpan>^ FindAll(
    SnapshotSpan searchRange, 
    SnapshotPoint startingPosition, 
    String^ searchPattern, 
    FindOptions options
)
abstract FindAll : 
        searchRange:SnapshotSpan * 
        startingPosition:SnapshotPoint * 
        searchPattern:string * 
        options:FindOptions -> IEnumerable<SnapshotSpan> 
function FindAll(
    searchRange : SnapshotSpan, 
    startingPosition : SnapshotPoint, 
    searchPattern : String, 
    options : FindOptions
) : IEnumerable<SnapshotSpan>

Parameters

  • searchPattern
    Type: String

    [in] The text pattern to search for.

Return Value

Type: IEnumerable<SnapshotSpan>
Returns an enumeration of SnapshotSpan containing the matches if any matches were found; otherwise, returns nulla null reference (Nothing in Visual Basic) if no matches were found.

Remarks

This method is safe to execute on any thread.

.NET Framework Security

See Also

Reference

ITextSearchService2 Interface

FindAll Overload

Microsoft.VisualStudio.Text.Operations Namespace