public void TestSessionAttributeRemoval() { bool locked; TimeSpan lockAge; object lockId; SessionStateActions actions; SessionStateStoreData data = m_store.GetItemExclusive(null, SESSION_ID, out locked, out lockAge, out lockId, out actions); Assert.IsTrue(locked); Assert.IsTrue(lockAge >= TimeSpan.Zero); Assert.IsNotNull(lockId); Assert.AreEqual(SessionStateActions.None, actions); ISessionStateItemCollection session = data.Items; AssertSessionDefaults(session); session.Remove("INT"); session.Remove("BLOB"); m_store.SetAndReleaseItemExclusive(null, SESSION_ID, data, lockId, false); data = m_store.GetItem(null, SESSION_ID, out locked, out lockAge, out lockId, out actions); Assert.IsFalse(locked); Assert.AreEqual(TimeSpan.Zero, lockAge); Assert.IsNull(lockId); Assert.AreEqual(SessionStateActions.None, actions); session = data.Items; Assert.IsNull(session["int"]); Assert.IsNull(session["blob"]); }
public void Remove(string name) { if (sessionItems == null) { return; } sessionItems.Remove(name); }
public void Remove(string name) { name = GetSessionNormalizedKeyToUse(name); if (innerCollection[name] != null) { addInDeletedKeys(name); } innerCollection.Remove(name); }
/// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public void Remove(String name) { _sessionItems.Remove(name); }
//</Snippet15> //<Snippet16> public void Remove(string name) { pSessionItems.Remove(name); }