示例#1
0
 public void ClearTest()
 {
     Collection.Add("Name");
     Assert.AreEqual(Collection.Length, 1);
     Collection.Clear();
     Assert.AreEqual(Collection.Length, 0);
 }
示例#2
0
        public void IndexedCollection_Clear()
        {
            var collection = new IndexedCollection <int, TestObject>(t => t.Sequence);

            collection.Add(_objects[0]);
            collection.Add(_objects[1]);

            Assert.AreEqual(2, collection.Count);

            collection.Clear();
            Assert.AreEqual(0, collection.Count);
        }
示例#3
0
    internal bool Remove(int ServerID = -1)
    {
        if (ServerID == -1)
        {
            Connections.Clear();
            zServers.Clear();
            zStacks.Clear();

            return(true);
        }

        Connections.RemoveServer(ServerID);
        zServers.Remove(ServerID);
        zStacks.Remove(ServerID);

        return(true);
    }
示例#4
0
 public void FlushRegistraions()
 {
     _registrations.Clear();
     _subscriptor.Clear();
 }