HasMember() public method

public HasMember ( UniqueAddress node ) : bool
node UniqueAddress
return bool
Beispiel #1
0
        /// <summary>
        /// TBD
        /// </summary>
        /// <param name="oldGossip">TBD</param>
        /// <param name="newGossip">TBD</param>
        /// <param name="selfUniqueAddress">TBD</param>
        /// <returns>TBD</returns>
        internal static ImmutableList <ReachableMember> DiffReachable(Gossip oldGossip, Gossip newGossip, UniqueAddress selfUniqueAddress)
        {
            if (newGossip.Equals(oldGossip))
            {
                return(ImmutableList <ReachableMember> .Empty);
            }

            return(oldGossip.Overview.Reachability.AllUnreachable
                   .Where(node => newGossip.HasMember(node) && newGossip.Overview.Reachability.IsReachable(node) && !node.Equals(selfUniqueAddress))
                   .Select(node => new ReachableMember(newGossip.GetMember(node)))
                   .ToImmutableList());
        }
Beispiel #2
0
 internal static ImmutableList <ReachableMember> DiffReachable(Gossip oldGossip, Gossip newGossip)
 {
     if (newGossip.Equals(oldGossip))
     {
         return(ImmutableList.Create <ReachableMember>());
     }
     return
         (oldGossip.Overview.Reachability.AllUnreachable
          .Where(a => newGossip.HasMember(a) && newGossip.Overview.Reachability.IsReachable(a))
          .Select(a => new ReachableMember(newGossip.GetMember(a)))
          .ToImmutableList());
 }
Beispiel #3
0
 internal static ImmutableList<ReachableMember> DiffReachable(Gossip oldGossip, Gossip newGossip)
 {
     if (newGossip.Equals(oldGossip)) return ImmutableList.Create<ReachableMember>();
     return
         oldGossip.Overview.Reachability.AllUnreachable
             .Where(a => newGossip.HasMember(a) && newGossip.Overview.Reachability.IsReachable(a))
             .Select(a => new ReachableMember(newGossip.GetMember(a)))
             .ToImmutableList();
 }