Example #1
0
 public void AddMessage(Message message)
 {
     lock (_lock)
     {
         New.Add(message);
         _event.Set();
     }
 }
Example #2
0
            void ProcessNotFoundByFilePath(FileObjectMapping file, Dictionary <string, string> changeDictionary)
            {
                var found = changeDictionary.FirstOrDefault(x => x.Value.Equals(file.Checksum));

                if (found.Key != null)
                {
                    ProcessFoundByChecksum(file, found.Key);
                }
                else
                {
                    New.Add(file.FilePath);
                }
            }
Example #3
0
        public void RegisterNew(TModel e)
        {
            TIdentity id = createIdentity(e);

            if (!All.ContainsKey(id))
            {
                All.Add(id, e);
            }

            if (!New.Contains(e))
            {
                New.Add(e);
            }
        }
Example #4
0
        public void TestAddRemove()
        {
            New.Add(1).Add(2).Add(3).Remove(2).Add(4).Contains(2).Contains(3);
            New.Add(1).Add(2).Add(3).Remove(2).Add(4).Remove(4).Remove(3).Remove(1).Remove(2);
            NoTrim.Add(1).Add(2).Add(3).Remove(2).Add(4).Remove(4).Remove(3).Remove(1).Remove(2).Add(5);
            var x = NoTrim;

            for (int i = 0; i < 100; i++)
            {
                x.Add(i);
            }
            for (int i = 0; i < 100; i++)
            {
                x.Remove(i);
            }
        }
Example #5
0
 public void TestAdd()
 {
     New.Add(1).Add(2).Add(3).Add(3);
 }