共用方式為


ITextUndoHistoryRegistry.TryGetHistory 方法

取得文字緩衝區中,與相關的記錄,但並不會建立一個新。

命名空間:  Microsoft.VisualStudio.Text.Operations
組件:  Microsoft.VisualStudio.Text.Logic (在 Microsoft.VisualStudio.Text.Logic.dll 中)

語法

'宣告
Function TryGetHistory ( _
    context As Object, _
    <OutAttribute> ByRef history As ITextUndoHistory _
) As Boolean
bool TryGetHistory(
    Object context,
    out ITextUndoHistory history
)
bool TryGetHistory(
    Object^ context, 
    [OutAttribute] ITextUndoHistory^% history
)
abstract TryGetHistory : 
        context:Object * 
        history:ITextUndoHistory byref -> bool
function TryGetHistory(
    context : Object, 
    history : ITextUndoHistory
) : boolean

參數

  • context
    類型:Object

    這個物件應永遠排在ITextBuffer

傳回值

類型:Boolean
true 如果沒有與指定的文字緩衝區中,否則相關的復原記錄false。

.NET Framework 安全性

請參閱

參考

ITextUndoHistoryRegistry 介面

Microsoft.VisualStudio.Text.Operations 命名空間