Exemple #1
0
 /// <summary>
 /// Get the values for all the specified keys, if they are in the
 /// cache.
 /// </summary>
 /// <remarks>
 /// <p>
 /// For each key that is in the cache, that key and its corresponding
 /// value will be placed in the dictionary that is returned by this
 /// method. The absence of a key in the returned dictionary indicates
 /// that it was not in the cache, which may imply (for caches that
 /// can load behind the scenes) that the requested data could not be
 /// loaded.</p>
 /// <p>
 /// The result of this method is defined to be semantically the same
 /// as the following implementation, without regards to threading
 /// issues:</p>
 /// <pre>
 /// IDictionary dict = new AnyDictionary();
 /// // could be a Hashtable (but does not have to)
 /// foreach (object key in colKeys)
 /// {
 ///     object value = this[key];
 ///     if (value != null || Contains(key))
 ///     {
 ///         dict[key] = value;
 ///     }
 /// }
 /// return dict;
 /// </pre>
 /// </remarks>
 /// <param name="keys">
 /// A collection of keys that may be in the named cache.
 /// </param>
 /// <returns>
 /// A dictionary of keys to values for the specified keys passed in
 /// <paramref name="keys"/>.
 /// </returns>
 public virtual IDictionary GetAll(ICollection keys)
 {
     return(NamedCache.GetAll(keys));
 }