Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Initializes a new instance of a NormalizedSnapshotSpanCollection from a list of Span objects 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 IEnumerable(Of Span) _
)
public NormalizedSnapshotSpanCollection(
    ITextSnapshot snapshot,
    IEnumerable<Span> spans
)
public:
NormalizedSnapshotSpanCollection(
    ITextSnapshot^ snapshot, 
    IEnumerable<Span>^ spans
)
new : 
        snapshot:ITextSnapshot * 
        spans:IEnumerable<Span> -> NormalizedSnapshotSpanCollection
public function NormalizedSnapshotSpanCollection(
    snapshot : ITextSnapshot, 
    spans : IEnumerable<Span>
)
Parameters
- snapshot
 Type: Microsoft.VisualStudio.Text.ITextSnapshot
 The ITextSnapshot to apply to spans.
- spans
 Type: System.Collections.Generic.IEnumerable<Span>
 A set of Span objects.
Exceptions
| Exception | Condition | 
|---|---|
| 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
NormalizedSnapshotSpanCollection Class