예제 #1
0
 public static void RemoveInteractives(string userId)
 {
     if (Interactives != null)
     {
         var interactive = Interactives.FirstOrDefault(p => p.FromID == userId);
         if (interactive != null)
         {
             Interactives.Remove(interactive);
         }
     }
 }
예제 #2
0
 public static void AddInteractive(string userId, string recieveId)
 {
     if (Interactives == null)
     {
         Interactives = new List <Interactive>();
     }
     if (Interactives.FirstOrDefault(p => p.FromID == userId && p.ReceiveID == recieveId) == null)
     {
         var interactive = new Interactive()
         {
             FromID = userId, ReceiveID = recieveId
         };
         Interactives.Add(interactive);
     }
 }