< Summary

Class:Microsoft.Azure.ServiceBus.Amqp.AmqpRequestMessage
Assembly:Microsoft.Azure.ServiceBus
File(s):C:\Git\azure-sdk-for-net\sdk\servicebus\Microsoft.Azure.ServiceBus\src\Amqp\AmqpRequestMessage.cs
Covered lines:0
Uncovered lines:10
Coverable lines:10
Total lines:33
Line coverage:0% (0 of 10)
Covered branches:0
Total branches:2
Branch coverage:0% (0 of 2)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
get_AmqpMessage()-0%100%
get_Map()-0%100%
CreateRequest(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\servicebus\Microsoft.Azure.ServiceBus\src\Amqp\AmqpRequestMessage.cs

#LineLine coverage
 1// Copyright (c) Microsoft. All rights reserved.
 2// Licensed under the MIT license. See LICENSE file in the project root for full license information.
 3
 4namespace Microsoft.Azure.ServiceBus.Amqp
 5{
 6    using System;
 7    using Azure.Amqp;
 8    using Azure.Amqp.Encoding;
 9    using Azure.Amqp.Framing;
 10
 11    internal sealed class AmqpRequestMessage
 12    {
 13        readonly AmqpMessage requestMessage;
 14
 015        AmqpRequestMessage(string operation, TimeSpan timeout, string trackingId)
 16        {
 017            this.Map = new AmqpMap();
 018            this.requestMessage = AmqpMessage.Create(new AmqpValue { Value = this.Map });
 019            this.requestMessage.ApplicationProperties.Map[ManagementConstants.Request.Operation] = operation;
 020            this.requestMessage.ApplicationProperties.Map[ManagementConstants.Properties.ServerTimeout] = (uint)timeout.
 021            this.requestMessage.ApplicationProperties.Map[ManagementConstants.Properties.TrackingId] = trackingId ?? Gui
 022        }
 23
 024        public AmqpMessage AmqpMessage => this.requestMessage;
 25
 026        public AmqpMap Map { get; }
 27
 28        public static AmqpRequestMessage CreateRequest(string operation, TimeSpan timeout, string trackingId)
 29        {
 030            return new AmqpRequestMessage(operation, timeout, trackingId);
 31        }
 32    }
 33}