Ejemplo n.º 1
0
 /// <summary>
 /// Adds an element with the provided key and value to the
 /// <b>IDictionary</b> object.
 /// </summary>
 /// <param name="value">
 /// The object to use as the value of the element to add.
 /// </param>
 /// <param name="key">
 /// The object to use as the key of the element to add.
 /// </param>
 public virtual void Add(object key, object value)
 {
     NamedCache.Add(key, value);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Returns the value to which this cache maps the specified key.
 /// </summary>
 /// <remarks>
 /// <p>
 /// Returns <c>null</c> if the cache contains no mapping for
 /// this key. A return value of <c>null</c> does not
 /// <i>necessarily</i> indicate that the cache contains no mapping
 /// for the key; it's also possible that the cache explicitly maps
 /// the key to <c>null</c>.</p>
 /// <p>
 /// The <see cref="IDictionary.Contains"/> operation may be used to
 /// distinguish these two cases.</p>
 /// </remarks>
 /// <param name="key">
 /// Key whose associated value is to be returned.
 /// </param>
 /// <returns>
 /// The value to which this cache maps the specified key, or
 /// <c>null</c> if the cache contains no mapping for this key.
 /// </returns>
 /// <exception cref="InvalidCastException">
 /// If the key is of an inappropriate type for this cache.
 /// </exception>
 /// <exception cref="NullReferenceException">
 /// If the key is <c>null</c> and this cache does not permit
 /// <c>null</c> keys.
 /// </exception>
 /// <seealso cref="IDictionary.Contains(object)"/>
 public virtual object this[object key]
 {
     get { return(NamedCache[key]); }
     set { NamedCache.Add(key, value); }
 }