共用方式為


IVsEditorAdaptersFactoryService.GetViewAdapter(ITextView) Method

Definition

Get the IVsTextView adapter for this text view (if it exists).

public:
 Microsoft::VisualStudio::TextManager::Interop::IVsTextView ^ GetViewAdapter(Microsoft::VisualStudio::Text::Editor::ITextView ^ textView);
public:
 Microsoft::VisualStudio::TextManager::Interop::IVsTextView ^ GetViewAdapter(Microsoft::VisualStudio::Text::Editor::ITextView ^ textView);
Microsoft::VisualStudio::TextManager::Interop::IVsTextView GetViewAdapter(Microsoft::VisualStudio::Text::Editor::ITextView const & textView);
public Microsoft.VisualStudio.TextManager.Interop.IVsTextView GetViewAdapter (Microsoft.VisualStudio.Text.Editor.ITextView textView);
public Microsoft.VisualStudio.TextManager.Interop.IVsTextView? GetViewAdapter (Microsoft.VisualStudio.Text.Editor.ITextView textView);
abstract member GetViewAdapter : Microsoft.VisualStudio.Text.Editor.ITextView -> Microsoft.VisualStudio.TextManager.Interop.IVsTextView
Public Function GetViewAdapter (textView As ITextView) As IVsTextView

Parameters

textView
ITextView

The text view of interest.

Returns

Null if no adapter exists, or else the adapter.

Exceptions

textView is null.

Remarks

Adapters are generally built only for document windows.

Applies to