Exemplo n.º 1
0
 /// <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;
 }
Exemplo n.º 2
0
 /// <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;
 }
Exemplo n.º 3
0
 /// <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;
 }
Exemplo n.º 4
0
 /// <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;
 }