ITextUndoHistoryRegistry.AttachHistory(Object, ITextUndoHistory) 方法

定义

将现有的附加 ITextUndoHistory 到新的上下文。 此注册表中不得映射上下文。

public:
 void AttachHistory(System::Object ^ context, Microsoft::VisualStudio::Text::Operations::ITextUndoHistory ^ history);
public:
 void AttachHistory(Platform::Object ^ context, Microsoft::VisualStudio::Text::Operations::ITextUndoHistory ^ history);
void AttachHistory(winrt::Windows::Foundation::IInspectable const & context, Microsoft::VisualStudio::Text::Operations::ITextUndoHistory const & history);
public void AttachHistory (object context, Microsoft.VisualStudio.Text.Operations.ITextUndoHistory history);
abstract member AttachHistory : obj * Microsoft.VisualStudio.Text.Operations.ITextUndoHistory -> unit
Public Sub AttachHistory (context As Object, history As ITextUndoHistory)

参数

context
Object

任意上下文对象。

history
ITextUndoHistory

ITextUndoHistory要与上下文关联的对象。

注解

只有弱引用保留在上下文中。

适用于