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);
 }