private void CheckCanUpdateParticipant(Participant newParticipant) { if (!newParticipant.AreAddressesEqual(this.Participant)) { throw new InvalidOperationException("Participant on a RecipientBase can be updated only to the one with the same address"); } }
internal static bool EqualsEntryId(byte[] x, byte[] y) { if (RuleUtil.EqualsByteArray(x, y)) { return(true); } Participant participant = RuleUtil.GetParticipant(x); Participant participant2 = RuleUtil.GetParticipant(y); return(!(participant == null) && !(participant2 == null) && participant.AreAddressesEqual(participant2)); }
internal static OneOffParticipantEntryId TryFromParticipant(Participant participant, ParticipantEntryIdConsumer consumer) { if (!(participant.Origin is OneOffParticipantOrigin)) { Participant participant2 = participant.ChangeOrigin(new OneOffParticipantOrigin()); if (!participant.AreAddressesEqual(participant2)) { return(null); } participant = participant2; } if (participant.RoutingType != null) { return(new OneOffParticipantEntryId(participant)); } return(null); }