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); }
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); }
public void onEvent <TKey>(object source, SCollectionHandlerEventArgs <TKey> args) { stream.WriteLine(DateTime.Now); stream.WriteLine(args.ToString()); }