Ejemplo n.º 1
0
        public bool ContainsStudent(TKey Key)
        {
            SCollectionHandlerEventArgs <TKey> arg = new SCollectionHandlerEventArgs <TKey>();

            arg.searchMetod = SearchMetod.byKey;
            arg.tKey        = Key;
            arg.searchTime  = Environment.TickCount;
            arg.searched    = collection.ContainsKey(Key);
            arg.searchTime  = Environment.TickCount - arg.searchTime;

            ContainsStudentEvent(this, arg);

            return(arg.searched);
        }
Ejemplo n.º 2
0
        public bool ContainsStudent(Student st)
        {
            SCollectionHandlerEventArgs <TKey> arg = new SCollectionHandlerEventArgs <TKey>();

            arg.searchMetod = SearchMetod.byValue;

            /*arg.searchTime = new System.Diagnostics.Stopwatch();
             * arg.searchTime.Start();
             * arg.searched = collection.ContainsValue(st);
             * arg.searchTime.Stop();*/
            arg.searchTime = Environment.TickCount;
            arg.searched   = collection.ContainsValue(st);
            arg.searchTime = Environment.TickCount - arg.searchTime;
            arg.tKey       = keySelector(st);

            ContainsStudentEvent(this, arg);

            return(arg.searched);
        }
Ejemplo n.º 3
0
 public void onEvent <TKey>(object source, SCollectionHandlerEventArgs <TKey> args)
 {
     stream.WriteLine(DateTime.Now);
     stream.WriteLine(args.ToString());
 }