예제 #1
0
 public int add(ConnectionPair cp)
 {
     if (!exist(cp))
     {
         list.Add(cp);
         return(0);
     }
     return(1);
 }
예제 #2
0
 public int remove(ConnectionPair cp)
 {
     if (exist(cp))
     {
         list.Remove(cp);
         return(0);
     }
     return(1);
 }
예제 #3
0
 public bool exist(ConnectionPair cp)
 {
     return(list.Exists(x => x == cp));
 }