NServiceBus.AuditConfigReader.TryGetAuditQueueAddress C# (CSharp) Method

TryGetAuditQueueAddress() public static method

Finds the configured audit queue for an endpoint. The audit queue can be configured using 'EndpointConfiguration.AuditProcessedMessagesTo()', via the 'QueueName' attribute of the 'Audit' config section or by using the 'HKEY_LOCAL_MACHINE\SOFTWARE\ParticularSoftware\ServiceBus\AuditQueue' registry key.
public static TryGetAuditQueueAddress ( this settings, string &address ) : bool
settings this The configuration settings for the endpoint.
address string The configured audit queue address for the endpoint.
return bool
        public static bool TryGetAuditQueueAddress(this ReadOnlySettings settings, out string address)
        {
            Guard.AgainstNull(nameof(settings), settings);

            Result result;
            if (!GetConfiguredAuditQueue(settings, out result))
            {
                address = null;
                return false;
            }

            address = result.Address;
            return true;
        }