public bool UnSubFirehost(Firehose firehose) { lock (m_firehoses) { for (int i = 0; i < m_firehoses.Count; i++) { if (m_firehoses[i].GetUniqueId() == firehose.GetUniqueId()) { m_firehoses.RemoveAt(i); return(true); } } return(false); } }
public bool SubFirehose(Firehose firehose) { lock (m_firehoses) { foreach (Firehose h in m_firehoses) { if (h.GetUniqueId() == firehose.GetUniqueId()) { return(false); } } m_firehoses.Add(firehose); return(true); } }