示例#1
0
 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)));
 }
示例#2
0
		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 ) );
		}
示例#3
0
        /// <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
        }
示例#4
0
        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
        }
示例#5
0
		/// <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)));
 }
示例#7
0
 /// <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));
 }
示例#8
0
 public static CacheSession CreateSession(string clientID, CacheStoragePolicy storagePolicy, bool streamBased)
 {
     return new CacheSession(_cacheService.Instance.CreateSession(clientID, (int)storagePolicy, streamBased));
 }