NServiceBus.RoutingOptionExtensions.IsRoutingReplyToAnyInstance C# (CSharp) Method

IsRoutingReplyToAnyInstance() public static method

Indicates whether RouteReplyToAnyInstance(NServiceBus.SendOptions) has been called on this options.
public static IsRoutingReplyToAnyInstance ( this options ) : bool
options this Option being extended.
return bool
        public static bool IsRoutingReplyToAnyInstance(this SendOptions options)
        {
            Guard.AgainstNull(nameof(options), options);

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

            return false;
        }