예제 #1
0
 /// <summary>
 /// Stores specified CacheItem into IsolatedStorage at location specified in constructor
 /// </summary>
 /// <param name="itemToStore">The <see cref="CacheItem"/> to store.</param>
 public void Store(CacheItem itemToStore)
 {
     keyField.Write(itemToStore.Key, false);
     valueField.Write(itemToStore.Value, true);
     scavengingPriorityField.Write(itemToStore.ScavengingPriority, false);
     refreshActionField.Write(itemToStore.RefreshAction, false);
     expirationsField.Write(itemToStore.Expirations, false);
     lastAccessedField.Write(itemToStore.LastAccessedTime, false);
 }
예제 #2
0
        /// <summary>
        /// Stores specified CacheItem into IsolatedStorage at location specified in constructor
        /// </summary>
        /// <param name="itemToStore">The <see cref="CacheItem"/> to store.</param>
        public void Store(CacheItem itemToStore)
        {
            if (itemToStore == null)
            {
                throw new ArgumentNullException("itemToStore");
            }

            keyField.Write(itemToStore.Key, false);
            valueField.Write(itemToStore.Value, true);
            scavengingPriorityField.Write(itemToStore.ScavengingPriority, false);
            refreshActionField.Write(itemToStore.RefreshAction, false);
            expirationsField.Write(itemToStore.GetExpirations(), false);
            lastAccessedField.Write(itemToStore.LastAccessedTime, false);
        }