public static CacheSession CreateSession(string clientID, CacheStoragePolicy storagePolicy, bool streamBased) { // typedef long nsCacheStoragePolicy in nsICache.idl // In WINDOWS long is 4 bytes int return (new CacheSession(_cacheService.Instance.CreateSession(clientID, new IntPtr((int)storagePolicy), streamBased))); }
public static CacheSession CreateSession( string clientID, CacheStoragePolicy storagePolicy, bool streamBased ) { // typedef long nsCacheStoragePolicy in nsICache.idl // In WINDOWS long is 4 bytes int return new CacheSession( _cacheService.Instance.CreateSession( clientID, new IntPtr( (int) storagePolicy ), streamBased ) ); }
/// <summary> /// This method evicts all entries in all devices implied by the storage policy. /// </summary> /// <param name="storagePolicy">The cache storage policy.</param> /// <remarks>This function may evict some items but will throw if it fails to evict everything.</remarks> /// <exception cref="System.Runtime.InteropServices.COMException"></exception> public static void Clear(CacheStoragePolicy storagePolicy) { #if false _cacheService.Instance.EvictEntries((int)storagePolicy); #else throw new NotImplementedException(); #endif }
public static CacheSession CreateSession(string clientID, CacheStoragePolicy storagePolicy, bool streamBased) { #if false return(new CacheSession(_cacheService.Instance.CreateSession(clientID, (int)storagePolicy, streamBased))); #else throw new NotImplementedException(); #endif }
/// <summary> /// This method evicts all entries in all devices implied by the storage policy. /// </summary> /// <param name="storagePolicy">The cache storage policy.</param> /// <remarks>This function may evict some items but will throw if it fails to evict everything.</remarks> /// <exception cref="System.Runtime.InteropServices.COMException"></exception> public static void Clear( CacheStoragePolicy storagePolicy ) { _cacheService.Instance.EvictEntries( new IntPtr( (int) storagePolicy ) ); }
public static CacheSession CreateSession(string clientID, CacheStoragePolicy storagePolicy, bool streamBased) { return(new CacheSession(_cacheService.Instance.CreateSession(clientID, (IntPtr)(int)storagePolicy, streamBased))); }
/// <summary> /// This method evicts all entries in all devices implied by the storage policy. /// </summary> /// <param name="storagePolicy">The cache storage policy.</param> /// <remarks>This function may evict some items but will throw if it fails to evict everything.</remarks> /// <exception cref="System.Runtime.InteropServices.COMException"></exception> public static void Clear(CacheStoragePolicy storagePolicy) { _cacheService.Instance.EvictEntries(new IntPtr((int)storagePolicy)); }
public static CacheSession CreateSession(string clientID, CacheStoragePolicy storagePolicy, bool streamBased) { return new CacheSession(_cacheService.Instance.CreateSession(clientID, (int)storagePolicy, streamBased)); }