Пример #1
0
        /// <summary>
        ///     Handles the Removed event of the DistributedMemoryManagerCache control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="KeyCacheEventArgs{TKey}" /> instance containing the event data.</param>
        protected override void DistributedMemoryManagerCache_Removed(object sender, KeyCacheEventArgs <long> e)
        {
            var message = new FieldEntityCacheMessage( );

            message.RemoveKeys.Add(e.Key);

            MessageChannel.Publish(message, PublishOptions.None, false, MergeMessages);
        }
Пример #2
0
        /// <summary>
        ///     Handles the Removed event of the DistributedMemoryManagerCache control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="KeyCacheEventArgs{TKey}" /> instance containing the event data.</param>
        protected override void DistributedMemoryManagerCache_Removed(object sender, KeyCacheEventArgs <long> e)
        {
            using (var entityTypeContext = new EntityTypeContext( ))
            {
                HashSet <long> types = entityTypeContext.Get(e.Key);

                var message = new EntityFieldCacheMessage( );
                message.RemoveKeys.Add(SerializableEntityId.Create(e.Key, types));

                MessageChannel.Publish(message, PublishOptions.None, false, MergeMessages);
            }
        }
Пример #3
0
 /// <summary>
 ///     Handles the Removed event of the DistributedMemoryManagerCache control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="KeyCacheEventArgs{TKey}" /> instance containing the event data.</param>
 /// <exception cref="System.NotImplementedException"></exception>
 protected abstract void DistributedMemoryManagerCache_Removed(object sender, KeyCacheEventArgs <TKey> e);