private void Storage_Dropped(object sender, BinaryEventArgs e)
        {
            var dropped = _dropped;

            if (dropped == null)
            {
                return;
            }
            var info = GetKeySpaceInfo(e.KeySpace);

            if (info.HeaderType == null)
            {
                if (info.ObjectCreator == null)
                {
                    return;
                }
                var entry = GetCore(e.Data, null, info.ObjectCreator());
                dropped(this, new ObjectEventArgs(new ObjectReference(
                                                      e.KeySpace, e.Key), false, entry.Instance));
            }
            else
            {
                if (info.ObjectCreator == null || info.HeaderCreator == null)
                {
                    return;
                }
                var list = new ObjectListForSingles <object, object>(this,
                                                                     e.KeySpace, e.Key, e.Data, info.ObjectCreator,
                                                                     info.HeaderCreator);
                dropped(this, new ObjectEventArgs(new ObjectReference(
                                                      e.KeySpace, e.Key), true, list));
            }
        }
        /// <summary>
        ///     <para>Gets a list of objects from the store, or creates one if the list is not found.</para>
        /// </summary>
        /// <typeparam name="T">
        ///     <para>The type of the objects in the list.</para>
        /// </typeparam>
        /// <typeparam name="THeader">
        ///     <para>The type of the list's header information.</para>
        /// </typeparam>
        /// <param name="keySpace">
        ///     <para>The key space of the list.</para>
        /// </param>
        /// <param name="key">
        ///     <para>The key of the list.</para>
        /// </param>
        /// <param name="header">
        ///     <para>A<typeparamref name="THeader"/> containing the
        /// list's header information.</para></param>
        /// <param name="expires">
        ///     <para>The expiration <see cref="DateTime"/> to use if the list must be created.</para>
        /// </param>
        /// <param name="creator">
        ///     <para>Delegate that provides an empty instance for stores that use
        ///		serialization. May be <see langword="null"/> for stores if
        ///		serialization not used or if store can create empty instances of
        ///     <typeparamref name="T"/> on its own.</para>
        /// </param>
        /// <param name="headerCreator">
        ///     <para>Delegate that provides an empty header instance for stores that use
        ///		serialization. May be <see langword="null"/> for stores if
        ///		serialization not used or if store can create empty instances of
        ///     <typeparamref name="THeader"/> on its own.</para>
        /// </param>
        /// <returns>
        ///     <para>The <see cref="StorageEntry{IObjectList}"/> read or created.</para>
        /// </returns>
        public StorageEntry <IObjectList <T, THeader> > GetOrCreateList <T, THeader>(DataBuffer keySpace, StorageKey key, THeader header, DateTime expires,
                                                                                     Func <T> creator, Func <THeader> headerCreator)
        {
            AddKeySpaceInfoForList <T, THeader>(keySpace);
            var allowsMultiple = Storage.GetAllowsMultiple(keySpace);
            IObjectList <T, THeader> list;

            if (Storage.Exists(keySpace, key))
            {
                if (allowsMultiple)
                {
                    var objectList = new ObjectListForMultiples <T, THeader>(this,
                                                                             keySpace, key, creator, headerCreator);
                    expires = objectList.Expires;
                    list    = objectList;
                }
                else
                {
                    var objectList = new ObjectListForSingles <T, THeader>(this,
                                                                           keySpace, key, DataBuffer.Empty, creator, headerCreator);
                    expires = objectList.Expires;
                    list    = objectList;
                }
            }
            else
            {
                if (allowsMultiple)
                {
                    list = new ObjectListForMultiples <T, THeader>(this,
                                                                   keySpace, key, creator, header, expires);
                }
                else
                {
                    list = new ObjectListForSingles <T, THeader>(this,
                                                                 keySpace, key, creator, header, expires);
                }
            }
            return(new StorageEntry <IObjectList <T, THeader> >(list,
                                                                DateTime.MinValue, expires));
        }
 /// <summary>
 ///     <para>Gets a list of objects from the store.</para>
 /// </summary>
 /// <typeparam name="T">
 ///     <para>The type of the objects in the list.</para>
 /// </typeparam>
 /// <typeparam name="THeader">
 ///     <para>The type of the list's header information.</para>
 /// </typeparam>
 /// <param name="keySpace">
 ///     <para>The key space of the list.</para>
 /// </param>
 /// <param name="key">
 ///     <para>The key of the list.</para>
 /// </param>
 /// <param name="creator">
 ///     <para>Delegate that provides an empty instance for stores that use
 ///		serialization. May be <see langword="null"/> for stores if
 ///		serialization not used or if store can create empty instances of
 ///     <typeparamref name="T"/> on its own.</para>
 /// </param>
 /// <param name="headerCreator">
 ///     <para>Delegate that provides an empty header instance for stores that use
 ///		serialization. May be <see langword="null"/> for stores if
 ///		serialization not used or if store can create empty instances of
 ///     <typeparamref name="THeader"/> on its own.</para>
 /// </param>
 /// <returns>
 ///     <para>The <see cref="StorageEntry{IObjectList}"/> containing the fetched list.</para>
 /// </returns>
 public StorageEntry <IObjectList <T, THeader> > GetList <T, THeader>(DataBuffer keySpace, StorageKey key,
                                                                      Func <T> creator, Func <THeader> headerCreator)
 {
     AddKeySpaceInfoForList <T, THeader>(keySpace);
     if (!Storage.Exists(keySpace, key))
     {
         return(StorageEntry <IObjectList <T, THeader> > .NotFound);
     }
     if (Storage.GetAllowsMultiple(keySpace))
     {
         var list = new ObjectListForMultiples <T, THeader>(this,
                                                            keySpace, key, creator, headerCreator);
         return(new StorageEntry <IObjectList <T, THeader> >(list,
                                                             DateTime.MinValue, list.Expires));
     }
     else
     {
         var list = new ObjectListForSingles <T, THeader>(this,
                                                          keySpace, key, DataBuffer.Empty, creator, headerCreator);
         return(new StorageEntry <IObjectList <T, THeader> >(list,
                                                             DateTime.MinValue, list.Expires));
     }
 }