NormalizedSnapshotSpanCollection Constructors

Definition

Overloads

NormalizedSnapshotSpanCollection()

Initializes an empty NormalizedSnapshotSpanCollection.

C++/CX
public:
 NormalizedSnapshotSpanCollection();

Applies to

Visual Studio SDK 2022 i druge verzije
Proizvod Verzije
Visual Studio SDK 2015, 2017, 2019, 2022

NormalizedSnapshotSpanCollection(SnapshotSpan)

Initializes a new instance of a NormalizedSnapshotSpanCollection with a single element.

C++
public:
 NormalizedSnapshotSpanCollection(Microsoft::VisualStudio::Text::SnapshotSpan span);

Parameters

span
SnapshotSpan

The sole member of the collection.

Exceptions

span is not initialized.

Applies to

Visual Studio SDK 2022 i druge verzije
Proizvod Verzije
Visual Studio SDK 2015, 2017, 2019, 2022

NormalizedSnapshotSpanCollection(IEnumerable<SnapshotSpan>)

Initializes a new instance of a NormalizedSnapshotSpanCollection from a list of SnapshotSpan objects.

C++
public:
 NormalizedSnapshotSpanCollection(System::Collections::Generic::IEnumerable<Microsoft::VisualStudio::Text::SnapshotSpan> ^ snapshotSpans);

Parameters

snapshotSpans
IEnumerable<SnapshotSpan>

An arbitrary set of SnapshotSpan objects.

Exceptions

snapshotSpans is null.

A SnapshotSpan is uninitialized, or it does not refer to the same ITextSnapshot as the other snapshot spans, or it refers to an uninitialized ITextSnapshot.

Applies to

Visual Studio SDK 2022 i druge verzije
Proizvod Verzije
Visual Studio SDK 2015, 2017, 2019, 2022

NormalizedSnapshotSpanCollection(IList<SnapshotSpan>)

Initializes a new instance of a NormalizedSnapshotSpanCollection from a list of SnapshotSpan objects.

C++
public:
 NormalizedSnapshotSpanCollection(System::Collections::Generic::IList<Microsoft::VisualStudio::Text::SnapshotSpan> ^ snapshotSpans);

Parameters

snapshotSpans
IList<SnapshotSpan>

An arbitrary set of SnapshotSpan objects.

Exceptions

snapshotSpans is null.

A SnapshotSpan is uninitialized, or it does not refer to the same ITextSnapshot as the other snapshot spans, or it refers to an uninitialized ITextSnapshot.

Applies to

Visual Studio SDK 2022 i druge verzije
Proizvod Verzije
Visual Studio SDK 2015, 2017, 2019, 2022

NormalizedSnapshotSpanCollection(ITextSnapshot, NormalizedSpanCollection)

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

C++
public:
 NormalizedSnapshotSpanCollection(Microsoft::VisualStudio::Text::ITextSnapshot ^ snapshot, Microsoft::VisualStudio::Text::NormalizedSpanCollection ^ spans);

Parameters

snapshot
ITextSnapshot

The ITextSnapshot to apply to spans.

spans
NormalizedSpanCollection

The normalized spans.

Exceptions

snapshot or spans is null.

The spans in spans extend beyond the end of snapshot.

Applies to

Visual Studio SDK 2022 i druge verzije
Proizvod Verzije
Visual Studio SDK 2015, 2017, 2019, 2022

NormalizedSnapshotSpanCollection(ITextSnapshot, Span)

C++/CX
public:
 NormalizedSnapshotSpanCollection(Microsoft::VisualStudio::Text::ITextSnapshot ^ snapshot, Microsoft::VisualStudio::Text::Span span);

Parameters

snapshot
ITextSnapshot
span
Span

Applies to

Visual Studio SDK 2022 i druge verzije
Proizvod Verzije
Visual Studio SDK 2015, 2017, 2019, 2022

NormalizedSnapshotSpanCollection(ITextSnapshot, IEnumerable<Span>)

Initializes a new instance of a NormalizedSnapshotSpanCollection from a list of Spans and a ITextSnapshot.

C++
public:
 NormalizedSnapshotSpanCollection(Microsoft::VisualStudio::Text::ITextSnapshot ^ snapshot, System::Collections::Generic::IEnumerable<Microsoft::VisualStudio::Text::Span> ^ spans);

Parameters

snapshot
ITextSnapshot

The ITextSnapshot to apply to spans.

spans
IEnumerable<Span>

An arbitrary set of Span objects.

Exceptions

snapshot or spans is null.

The spans in spans extend beyond the end of snapshot.

Applies to

Visual Studio SDK 2022 i druge verzije
Proizvod Verzije
Visual Studio SDK 2015, 2017, 2019, 2022

NormalizedSnapshotSpanCollection(ITextSnapshot, IList<Span>)

Initializes a new instance of a NormalizedSnapshotSpanCollection from a list of Spans and a ITextSnapshot.

C++
public:
 NormalizedSnapshotSpanCollection(Microsoft::VisualStudio::Text::ITextSnapshot ^ snapshot, System::Collections::Generic::IList<Microsoft::VisualStudio::Text::Span> ^ spans);

Parameters

snapshot
ITextSnapshot

The ITextSnapshot to apply to spans.

spans
IList<Span>

An arbitrary set of Span objects.

Exceptions

snapshot or spans is null.

snapshot or spans is null.

The spans in spans extend beyond the end of snapshot.

Applies to

Visual Studio SDK 2022 i druge verzije
Proizvod Verzije
Visual Studio SDK 2015, 2017, 2019, 2022