public RegisterStep(PartitionKeyExtractor partitionKeyExtractor, ContainerInformationExtractor containerInformationExtractor) : base(nameof(TransactionInformationBeforeTheLogicalOutboxBehavior), typeof(TransactionInformationBeforeTheLogicalOutboxBehavior), "Populates the transaction information before the logical outbox.", b => { var partitionKeyExtractors = b.GetServices <IPartitionKeyFromMessageExtractor>(); foreach (var extractor in partitionKeyExtractors) { partitionKeyExtractor.ExtractPartitionKeyFromMessages(extractor); } var containerInformationFromMessagesExtractors = b.GetServices <IContainerInformationFromMessagesExtractor>(); foreach (var extractor in containerInformationFromMessagesExtractors) { containerInformationExtractor.ExtractContainerInformationFromMessage(extractor); } return(new TransactionInformationBeforeTheLogicalOutboxBehavior(partitionKeyExtractor, containerInformationExtractor)); }) =>
/// <summary> /// Adds an instance of <see cref="IPartitionKeyFromMessageExtractor"/> to the list of header extractors. /// </summary> /// <param name="extractor">The custom extractor.</param> /// <remarks>Explicitly added extractors and extraction rules are executed before extractors registered on the container.</remarks> public void ExtractPartitionKeyFromMessages(IPartitionKeyFromMessageExtractor extractor) => PartitionKeyExtractor.ExtractPartitionKeyFromMessages(extractor);