/// <summary> /// Adds the target to the provider</summary> /// <param name="target">Target to add to the provider</param> /// <returns>True iff the target is successfully added</returns> public bool AddTarget(TargetInfo target) { if (target is TcpIpTargetInfo && !m_targets.Contains(target)) { m_targets.Add(target); foreach (var targetConsumer in TargetConsumers) targetConsumer.TargetsChanged(this, m_targets); return true; } return false; }
/// <summary> /// Removes the target from the provider</summary> /// <param name="target">Target to remove from the provider</param> /// <returns>True iff the target is successfully removed</returns> public bool Remove(TargetInfo target) { var tcpTarget = m_targets.FirstOrDefault(n => n == target); if (tcpTarget != null) { m_targets.Remove(tcpTarget); foreach (var targetConsumer in TargetConsumers) targetConsumer.TargetsChanged(this, m_targets); return true; } return false; }
/// <summary> /// Removes the target from the provider</summary> /// <param name="target">Target</param> /// <returns>True iff the target is successfully removed</returns> public bool Remove(TargetInfo target) { return false; }
/// <summary> /// Adds the target to the provider</summary> /// <param name="target">Target</param> /// <returns>True iff the target is successfully added</returns> public bool AddTarget(TargetInfo target) { return false; }