Akka.Cluster.Gossip.AssertInvariants C# (CSharp) Method

AssertInvariants() private method

private AssertInvariants ( ) : void
return void
        private void AssertInvariants()
        {
            if(_members.Any(m => m.Status == MemberStatus.Removed))
                throw new ArgumentException(string.Format("Live members must not have status [Removed], got {0}", 
                    _members.Where(m => m.Status == MemberStatus.Removed).Select(m => m.ToString()).Aggregate((a, b) => a + ", " + b)));

            var inReachabilityButNotMember =
                _overview.Reachability.AllObservers.Except(_members.Select(m => m.UniqueAddress));
            if(!inReachabilityButNotMember.IsEmpty)
                throw new ArgumentException("Nodes not part of cluster in reachability table, got {0}", 
                    inReachabilityButNotMember.Select(a => a.ToString()).Aggregate((a,b) => a + ", " + b));

            var seenButNotMember = _overview.Seen.Except(_members.Select(m => m.UniqueAddress));
            if (!seenButNotMember.IsEmpty)
                throw new ArgumentException("Nodes not part of cluster have marked the Gossip as seen, got {0}",
                    seenButNotMember.Select(a => a.ToString()).Aggregate((a, b) => a + ", " + b));
        }