Condividi tramite


IVsTextManager.AdjustFileChangeIgnoreCount(IVsTextBuffer, Int32) Method

Definition

Increases or decreases the ignore count for file changes.

public:
 int AdjustFileChangeIgnoreCount(Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer ^ pBuffer, int fIgnore);
public:
 int AdjustFileChangeIgnoreCount(Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer ^ pBuffer, int fIgnore);
int AdjustFileChangeIgnoreCount(Microsoft::VisualStudio::TextManager::Interop::IVsTextBuffer const & pBuffer, int fIgnore);
public int AdjustFileChangeIgnoreCount (Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer pBuffer, int fIgnore);
abstract member AdjustFileChangeIgnoreCount : Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer * int -> int
Public Function AdjustFileChangeIgnoreCount (pBuffer As IVsTextBuffer, fIgnore As Integer) As Integer

Parameters

pBuffer
IVsTextBuffer

[in] Pointer to the IVsTextBuffer interface for which to set the ignore count.

fIgnore
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.

Returns

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.

Applies to