IVsTextManager.AdjustFileChangeIgnoreCount Method (IVsTextBuffer, Int32)


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)

int AdjustFileChangeIgnoreCount(
	IVsTextBuffer pBuffer,
	int fIgnore


Type: Microsoft.VisualStudio.TextManager.Interop.IVsTextBuffer

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

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.

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.

Return to top