IRtfBuilderService2.GenerateRtf Method

Definition

Overloads

GenerateRtf(NormalizedSnapshotSpanCollection, CancellationToken)

Gets an RTF string containing the formatted text of the snapshot spans.

GenerateRtf(NormalizedSnapshotSpanCollection, ITextView, CancellationToken)

Gets an RTF string that contains the formatted text of the spans.

GenerateRtf(NormalizedSnapshotSpanCollection, String, CancellationToken)

Gets an RTF string containing the formatted text of the snapshot spans.

GenerateRtf(NormalizedSnapshotSpanCollection, ITextView, String, CancellationToken)

Gets an RTF string that contains the formatted text of the spans.

GenerateRtf(NormalizedSnapshotSpanCollection, CancellationToken)

Gets an RTF string containing the formatted text of the snapshot spans.

public:
 System::String ^ GenerateRtf(Microsoft::VisualStudio::Text::NormalizedSnapshotSpanCollection ^ spans, System::Threading::CancellationToken cancellationToken);
public string GenerateRtf (Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection spans, System.Threading.CancellationToken cancellationToken);
abstract member GenerateRtf : Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection * System.Threading.CancellationToken -> string
Public Function GenerateRtf (spans As NormalizedSnapshotSpanCollection, cancellationToken As CancellationToken) As String

Parameters

spans
NormalizedSnapshotSpanCollection

The collection of snapshot spans.

cancellationToken
CancellationToken

CancellationToken used to indicate when to abandon the effort to generate the rich text.

Returns

A String containing RTF data.

Remarks

The generated RTF text is based on an in-order walk of the snapshot spans. A new line "\par" rtf keyword will be placed between the provided SnapshotSpans.

Applies to

GenerateRtf(NormalizedSnapshotSpanCollection, ITextView, CancellationToken)

Gets an RTF string that contains the formatted text of the spans.

public:
 System::String ^ GenerateRtf(Microsoft::VisualStudio::Text::NormalizedSnapshotSpanCollection ^ spans, Microsoft::VisualStudio::Text::Editor::ITextView ^ textView, System::Threading::CancellationToken cancellationToken);
public string GenerateRtf (Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection spans, Microsoft.VisualStudio.Text.Editor.ITextView textView, System.Threading.CancellationToken cancellationToken);
abstract member GenerateRtf : Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection * Microsoft.VisualStudio.Text.Editor.ITextView * System.Threading.CancellationToken -> string
Public Function GenerateRtf (spans As NormalizedSnapshotSpanCollection, textView As ITextView, cancellationToken As CancellationToken) As String

Parameters

spans
NormalizedSnapshotSpanCollection

The collection of snapshot spans.

textView
ITextView

The ITextView that contains the snapshot spans.

cancellationToken
CancellationToken

CancellationToken used to indicate when to abandon the effort to generate the rich text.

Returns

A String containing RTF data.

Remarks

The generated RTF text is based on an in-order walk of the snapshot spans, with the characteristics and formatting properties of textView. All the snapshot spans must belong to textView. A new line "\par" rtf keyword will be placed between the provided SnapshotSpans.

Applies to

GenerateRtf(NormalizedSnapshotSpanCollection, String, CancellationToken)

Gets an RTF string containing the formatted text of the snapshot spans.

public:
 System::String ^ GenerateRtf(Microsoft::VisualStudio::Text::NormalizedSnapshotSpanCollection ^ spans, System::String ^ delimiter, System::Threading::CancellationToken cancellationToken);
public string GenerateRtf (Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection spans, string delimiter, System.Threading.CancellationToken cancellationToken);
abstract member GenerateRtf : Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection * string * System.Threading.CancellationToken -> string
Public Function GenerateRtf (spans As NormalizedSnapshotSpanCollection, delimiter As String, cancellationToken As CancellationToken) As String

Parameters

spans
NormalizedSnapshotSpanCollection

The collection of snapshot spans.

delimiter
String

A delimiter string to be inserted between the RTF generated code for the SnapshotSpans in the NormalizedSnapshotSpanCollection.

cancellationToken
CancellationToken

CancellationToken used to indicate when to abandon the effort to generate the rich text.

Returns

A String containing RTF data.

Remarks

The generated RTF text is based on an in-order walk of the snapshot spans.

Applies to

GenerateRtf(NormalizedSnapshotSpanCollection, ITextView, String, CancellationToken)

Gets an RTF string that contains the formatted text of the spans.

public:
 System::String ^ GenerateRtf(Microsoft::VisualStudio::Text::NormalizedSnapshotSpanCollection ^ spans, Microsoft::VisualStudio::Text::Editor::ITextView ^ textView, System::String ^ delimiter, System::Threading::CancellationToken cancellationToken);
public string GenerateRtf (Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection spans, Microsoft.VisualStudio.Text.Editor.ITextView textView, string delimiter, System.Threading.CancellationToken cancellationToken);
abstract member GenerateRtf : Microsoft.VisualStudio.Text.NormalizedSnapshotSpanCollection * Microsoft.VisualStudio.Text.Editor.ITextView * string * System.Threading.CancellationToken -> string
Public Function GenerateRtf (spans As NormalizedSnapshotSpanCollection, textView As ITextView, delimiter As String, cancellationToken As CancellationToken) As String

Parameters

spans
NormalizedSnapshotSpanCollection

The collection of snapshot spans.

textView
ITextView

The ITextView that contains the snapshot spans.

delimiter
String

A delimiter string to be inserted between the RTF generated code for the SnapshotSpans in the NormalizedSnapshotSpanCollection.

cancellationToken
CancellationToken

CancellationToken used to indicate when to abandon the effort to generate the rich text.

Returns

A String containing RTF data.

Remarks

The generated RTF text is based on an in-order walk of the snapshot spans, with the characteristics and formatting properties of textView. All the snapshot spans must belong to textView.

Applies to