NServiceBus.HeaderOptionExtensions.GetHeaders C# (CSharp) Method

GetHeaders() public static method

Returns all headers set by SetHeader on the outgoing message.
public static GetHeaders ( this options ) : string>.IReadOnlyDictionary
options this
return string>.IReadOnlyDictionary
        public static IReadOnlyDictionary<string, string> GetHeaders(this ExtendableOptions options)
        {
            Guard.AgainstNull(nameof(options), options);

            return new ReadOnlyDictionary<string, string>(options.OutgoingHeaders);
        }
    }
HeaderOptionExtensions