private static bool IsMatchedByEndPoint(RaftClusterMember member, IPEndPoint endPoint) => member.Endpoint.Equals(endPoint);
static async Task <TResponse> TryReceiveMessage(RaftClusterMember sender, IMessage message, IEnumerable <IInputChannel> handlers, MessageReader <TResponse> responseReader, CancellationToken token) { var responseMsg = await(handlers.TryReceiveMessage(sender, message, null, token) ?? throw new UnexpectedStatusCodeException(new NotImplementedException())).ConfigureAwait(false); return(await responseReader(responseMsg, token).ConfigureAwait(false)); }
private static bool IsMatchedById(RaftClusterMember actual, ClusterMemberId expected) => actual.Id == expected;