Condividi tramite


ITextSearchService2.FindAll Method (SnapshotSpan, String, FindOptions)

Searches for all occurrences of the given search pattern, using the given starting range 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, _
    searchPattern As String, _
    options As FindOptions _
) As IEnumerable(Of SnapshotSpan)
IEnumerable<SnapshotSpan> FindAll(
    SnapshotSpan searchRange,
    string searchPattern,
    FindOptions options
)
IEnumerable<SnapshotSpan>^ FindAll(
    SnapshotSpan searchRange, 
    String^ searchPattern, 
    FindOptions options
)
abstract FindAll : 
        searchRange:SnapshotSpan * 
        searchPattern:string * 
        options:FindOptions -> IEnumerable<SnapshotSpan> 
function FindAll(
    searchRange : SnapshotSpan, 
    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