Beispiel #1
0
        public RAMValue GetRAMValue(string key)
        {
            switch (_watchMode)
            {
            case WatchMode.SingleThreaded:
                return(WatchList.Where(p => p.Key == key).SingleOrDefault());

            case WatchMode.MultiThreaded_A:
                List <RAMValue> tmpList = ReadWatchList.Union(WriteWatchList).Union(FreezeWatchList).ToList();
                return(tmpList.Where(p => p.Key == key).SingleOrDefault());

            case WatchMode.MultiThreaded_N:
                return(null);

            case WatchMode.MultiThreaded_S:
                return(null);
            }
            return(null);
        }
Beispiel #2
0
 private void RemoveWatch(string wlName, RAMValue rvt)
 {
     rvt.RemoveKey();
     if (wlName == "ReadWatchList")
     {
         ReadWatchList.Remove(rvt);
     }
     else if (wlName == "WriteWatchList")
     {
         WriteWatchList.Remove(rvt);
     }
     else if (wlName == "FreezeWatchList")
     {
         FreezeWatchList.Remove(rvt);
     }
     else if (wlName == "ALL")
     {
         ReadWatchList.Remove(rvt);
         WriteWatchList.Remove(rvt);
         FreezeWatchList.Remove(rvt);
     }
 }