NServiceBus.RoutingOptionExtensions.GetReplyToRoute C# (CSharp) Method

GetReplyToRoute() public static method

Returns the configured route by RouteReplyTo(NServiceBus.ReplyOptions,string).
public static GetReplyToRoute ( this options ) : string
options this Option being extended.
return string
        public static string GetReplyToRoute(this ReplyOptions options)
        {
            Guard.AgainstNull(nameof(options), options);

            ApplyReplyToAddressBehavior.State state;
            if (options.Context.TryGet(out state) && state.Option == ApplyReplyToAddressBehavior.RouteOption.ExplicitReplyDestination)
            {
                return state.ExplicitDestination;
            }

            return null;
        }