Partager via


NormalizedSnapshotSpanCollection Constructor (ITextSnapshot, IList<Span>)

Initializes a new instance of a NormalizedSnapshotSpanCollection from a NormalizedSpanCollection and a ITextSnapshot.

Namespace:  Microsoft.VisualStudio.Text
Assembly:  Microsoft.VisualStudio.Text.Data (in Microsoft.VisualStudio.Text.Data.dll)

Syntax

'Declaration
Public Sub New ( _
    snapshot As ITextSnapshot, _
    spans As IList(Of Span) _
)
public NormalizedSnapshotSpanCollection(
    ITextSnapshot snapshot,
    IList<Span> spans
)
public:
NormalizedSnapshotSpanCollection(
    ITextSnapshot^ snapshot, 
    IList<Span>^ spans
)
new : 
        snapshot:ITextSnapshot * 
        spans:IList<Span> -> NormalizedSnapshotSpanCollection
public function NormalizedSnapshotSpanCollection(
    snapshot : ITextSnapshot, 
    spans : IList<Span>
)

Parameters

  • spans
    Type: IList<Span>

    The normalized spans.

Exceptions

Exception Condition
["T:System.ArgumentNullException]

snapshot or spans is nulla null reference (Nothing in Visual Basic).

ArgumentException

The spans in spans extend beyond the end of snapshot.

.NET Framework Security

See Also

Reference

NormalizedSnapshotSpanCollection Class

NormalizedSnapshotSpanCollection Overload

Microsoft.VisualStudio.Text Namespace