Example #1
0
 public InterestsContext(
     MainPool pool,
     MainStorage storage)
 {
     _pool    = pool;
     _storage = storage.Interests;
 }
Example #2
0
        public IEnumerable <int> Filter(
            GroupRequest.InterestRequest interests,
            InterestStorage interestsStorage)
        {
            short id = interestsStorage.Get(interests.Interest);

            return(_id2AccId[id] ?? Enumerable.Empty <int>());
        }
Example #3
0
        public void GetTest()
        {
            Dictionary <Guid, InterestStorage> dict = new Dictionary <Guid, InterestStorage>();
            Guid id = Guid.NewGuid();

            dict.Add(id, new InterestStorage(2, 3));
            dict.Add(Guid.NewGuid(), new InterestStorage(3, 4));
            InterestStorage result = InterestStorage.Empty;

            dict.TryGetValue(id, out result);
            Assert.AreEqual(2, result.Interest);
            Assert.AreEqual(3, result.Storage);
        }