Freigeben über


IVsTextManager.AdjustFileChangeIgnoreCount Method

Increases or decreases the ignore count for file changes.

Namespace:  Microsoft.VisualStudio.TextManager.Interop
Assembly:  Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)

Syntax

'Declaration
Function AdjustFileChangeIgnoreCount ( _
    pBuffer As IVsTextBuffer, _
    fIgnore As Integer _
) As Integer
int AdjustFileChangeIgnoreCount(
    IVsTextBuffer pBuffer,
    int fIgnore
)
int AdjustFileChangeIgnoreCount(
    [InAttribute] IVsTextBuffer^ pBuffer, 
    [InAttribute] int fIgnore
)
abstract AdjustFileChangeIgnoreCount : 
        pBuffer:IVsTextBuffer * 
        fIgnore:int -> int 
function AdjustFileChangeIgnoreCount(
    pBuffer : IVsTextBuffer, 
    fIgnore : int
) : int

Parameters

  • fIgnore
    Type: System.Int32
    [in] If true, then the ignore count is increased by a value of one. If false, then the ignore count is decreased by a value of one for the referenced buffer.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From textmgr.idl:

HRESULT IVsTextManager::AdjustFileChangeIgnoreCount(
   [in] IVsTextBuffer *pBuffer,
   [in] BOOL fIgnore
);

The ignore count indicates that changes made to the text buffer should be ignored. If the ignore count is not set, then changes to the buffer may result in the user being presented with a dialog box or other notification. For example, if the file associated with a text buffer is under source control and a change is made externally to this file, then the system would query the user to reload the file if the ignore count was not set.

The ignore count is incremental, and increases by a value of one each time IVsTextManager.AdjustFileChangeIgnoreCount is called and a value of true is specified for the bIgnore parameter. File change notifications are ignored until the ignore count is returned to zero by calling IVsTextManager.AdjustFileChangeIgnoreCount and specifying a value of false for bIgnore.

.NET Framework Security

See Also

Reference

IVsTextManager Interface

Microsoft.VisualStudio.TextManager.Interop Namespace