public void Add(Guid key, AbstractConversation value) { CheckGuid(key); lock (this) { if (pool.ContainsKey(key)) { throw new ArgumentException( "this key has been used and thus cannot be used to add conversation to the pool"); } CleanUpTimeoutConversation(); pool[key] = new ConversationPoolItem(value); } }
public void Add(Guid key, AbstractConversation value) { CheckGuid(key); lock (this) { if (pool.ContainsKey(key)) { throw new ArgumentException( "this key has been used and thus cannot be used to add conversation to the pool"); } CleanUpTimeoutConversation(); pool[key] = new ConversationPoolItem(value); } }