private void SubscribedItem_OnItemDisposed(ItemDisposedMessage itemDisposeMessage) { MessageCounters.CounterReceive.Increment(); // InterestArea have to be locked lock (this.SyncRoot) { this.UnsubscribeItem(itemDisposeMessage.Source); } }
private void RemoveItem(ItemDisposedMessage message) { ////log.InfoFormat("remove item {0}", message.Source.Id); Item item = message.Source; this.itemPositions.Remove(item); this.itemSubscriptions[item].Dispose(); this.itemSubscriptions.Remove(item); this.PublishUpdate(item, Vector.Zero, true, false); }
private void AttachedItem_OnItemDisposed(ItemDisposedMessage message) { MessageCounters.CounterReceive.Increment(); lock (this.SyncRoot) { if (message.Source == this.AttachedItem) { this.Detach(); } } }
private void RemoveItem(ItemDisposedMessage message) { ////log.InfoFormat("remove item {0}", message.Source.Id); Item item = message.Source; this.itemPositions.Remove(item); this.itemSubscriptions[item].Dispose(); this.itemSubscriptions.Remove(item); this.PublishUpdate(item, Vector.Zero, true, false); }