Exemple #1
0
        public void GetAll()
        {
            var d = new SnapDictionary <int, string>();

            d.Test.CollectAuto = false;

            Assert.AreEqual(0, d.Test.GetValues(1).Length);

            d.Set(1, "one");
            d.Set(2, "two");
            d.Set(3, "three");
            d.Set(4, "four");

            SnapDictionary <int, string> .Snapshot s1 = d.CreateSnapshot();
            string[] all = s1.GetAll().ToArray();
            Assert.AreEqual(4, all.Length);
            Assert.AreEqual("one", all[0]);
            Assert.AreEqual("four", all[3]);

            d.Set(1, "uno");
            SnapDictionary <int, string> .Snapshot s2 = d.CreateSnapshot();

            all = s1.GetAll().ToArray();
            Assert.AreEqual(4, all.Length);
            Assert.AreEqual("one", all[0]);
            Assert.AreEqual("four", all[3]);

            all = s2.GetAll().ToArray();
            Assert.AreEqual(4, all.Length);
            Assert.AreEqual("uno", all[0]);
            Assert.AreEqual("four", all[3]);
        }
Exemple #2
0
    /// <inheritdoc />
    public IEnumerable <Domain> GetAll(bool includeWildcards)
    {
        IEnumerable <Domain> list = _snapshot.GetAll();

        if (includeWildcards == false)
        {
            list = list.Where(x => x.IsWildcard == false);
        }

        return(list);
    }
Exemple #3
0
 public IEnumerable <TValue> GetAll()
 {
     if (_gen < 0)
     {
         throw new ObjectDisposedException("snapshot" /*+ " (" + _thisCount + ")"*/);
     }
     return(_store.GetAll(_gen));
 }
 public IEnumerable <TValue> GetAll()
 {
     EnsureNotDisposed();
     return(_store.GetAll(_gen));
 }