IVsFontAndColorCacheManager.CheckCache Method

Determines if a given Category's state is cached and current.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)

Syntax

‘선언
Function CheckCache ( _
    ByRef rguidCategory As Guid, _
    <OutAttribute> ByRef pfHasData As Integer _
) As Integer
‘사용 방법
Dim instance As IVsFontAndColorCacheManager
Dim rguidCategory As Guid
Dim pfHasData As Integer
Dim returnValue As Integer

returnValue = instance.CheckCache(rguidCategory, _
    pfHasData)
int CheckCache(
    ref Guid rguidCategory,
    out int pfHasData
)
int CheckCache(
    [InAttribute] Guid% rguidCategory, 
    [OutAttribute] int% pfHasData
)
abstract CheckCache : 
        rguidCategory:Guid byref * 
        pfHasData:int byref -> int 
function CheckCache(
    rguidCategory : Guid, 
    pfHasData : int
) : int

Parameters

  • rguidCategory
    Type: System.Guid%
    [in] Specifies the GUID of the Category of Display Items whose caching state is being checked
  • pfHasData
    Type: System.Int32%
    [out] Flag indicating if a Category's default Fonts and Colors cache state.
    If pfHasData is true, the Category's state is current and cached.
    If pfHasData is false, the Category's state is not cached.

Return Value

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

Remarks

If a Category's state is not up to date, the Visual Studio environment clears any of its cached information by calling ClearCache.

COM Signature

From vsshell80.idl:

HRESULT IVsFontAndColorCacheManager::CheckCache(
   [in] REFGUID rguidCategory,
   [out] BOOL *pfHasData
);

Examples

    RESULT hr = S_OK;
    CComPtr<IVsFontAndColorCacheManager> spCacheManager;
    BOOL fCached = FALSE;

    // Check to see if the info for this category is cached, refreshing the cache if necessary.
    if (SUCCEEDED(GetFontColorCacheManager(&spCacheManager)))
    {
        spCacheManager->CheckCache(rguidCategory, &fCached);
        if (!fCached && fAllowCacheRefresh && fAllowPackageLoad)
        {
            spCacheManager->RefreshCache(rguidCategory);
            spCacheManager->CheckCache(rguidCategory, &fCached);
        }
    }

.NET Framework Security

See Also

Reference

IVsFontAndColorCacheManager Interface

IVsFontAndColorCacheManager Members

Microsoft.VisualStudio.Shell.Interop Namespace

IVsFontAndColorCacheManager

Other Resources

Fonts