コード例 #1
0
        public async Task Should_enable_tracing()
        {
            var vhost = await managementClient.GetVhostAsync(vhostName).ConfigureAwait(false);

            await managementClient.EnableTracingAsync(vhost).ConfigureAwait(false);

            var vhostAfterUpdate = await managementClient.GetVhostAsync(vhostName).ConfigureAwait(false);

            Assert.True(vhostAfterUpdate.Tracing);
        }
コード例 #2
0
        /// <summary>
        ///     Enable tracing on given virtual host.
        /// </summary>
        /// <param name="source"></param>
        /// <param name="vhost">The virtual host on which to enable tracing</param>
        /// <param name="cancellationToken"></param>
        public static void EnableTracing(
            [NotNull] this IManagementClient source,
            [NotNull] Vhost vhost,
            CancellationToken cancellationToken = default
            )
        {
            if (source == null)
            {
                throw new ArgumentNullException(nameof(source));
            }

            source.EnableTracingAsync(vhost, cancellationToken)
            .GetAwaiter()
            .GetResult();
        }