public static Speaker SynchronizedAdd(SpeakerCollection speakers, Speaker s) { var found = speakers.FirstOrDefault(sp => sp.DBID == s.DBID); if (found == null) { speakers.Add(s); } else { if (found.Synchronized < s.Synchronized) { speakers.Remove(found); speakers.Add(s); return(found); } } return(null); }
public static Speaker SynchronizedAdd(SpeakerCollection speakers, Speaker s) { var found = speakers.FirstOrDefault(sp=>sp.DBID == s.DBID); if (found == null) { speakers.Add(s); } else { if(found.Synchronized < s.Synchronized) { speakers.Remove(found); speakers.Add(s); return found; } } return null; }
internal void AddLocalSpeaker(Speaker sp) { _local.Add(sp); _allSpeakers.Add(new SpeakerContainer(_local, sp)); Refresh(); }