Sdílet prostřednictvím


ServiceBusModelFactory.ServiceBusReceivedMessage Method

Definition

Creates a new ServiceBusReceivedMessage instance for mocking.

public static Azure.Messaging.ServiceBus.ServiceBusReceivedMessage ServiceBusReceivedMessage (BinaryData body = default, string messageId = default, string partitionKey = default, string viaPartitionKey = default, string sessionId = default, string replyToSessionId = default, TimeSpan timeToLive = default, string correlationId = default, string subject = default, string to = default, string contentType = default, string replyTo = default, DateTimeOffset scheduledEnqueueTime = default, System.Collections.Generic.IDictionary<string,object> properties = default, Guid lockTokenGuid = default, int deliveryCount = 0, DateTimeOffset lockedUntil = default, long sequenceNumber = -1, string deadLetterSource = default, long enqueuedSequenceNumber = 0, DateTimeOffset enqueuedTime = default, Azure.Messaging.ServiceBus.ServiceBusMessageState serviceBusMessageState = Azure.Messaging.ServiceBus.ServiceBusMessageState.Active);
static member ServiceBusReceivedMessage : BinaryData * string * string * string * string * string * TimeSpan * string * string * string * string * string * DateTimeOffset * System.Collections.Generic.IDictionary<string, obj> * Guid * int * DateTimeOffset * int64 * string * int64 * DateTimeOffset * Azure.Messaging.ServiceBus.ServiceBusMessageState -> Azure.Messaging.ServiceBus.ServiceBusReceivedMessage
Public Shared Function ServiceBusReceivedMessage (Optional body As BinaryData = Nothing, Optional messageId As String = Nothing, Optional partitionKey As String = Nothing, Optional viaPartitionKey As String = Nothing, Optional sessionId As String = Nothing, Optional replyToSessionId As String = Nothing, Optional timeToLive As TimeSpan = Nothing, Optional correlationId As String = Nothing, Optional subject As String = Nothing, Optional to As String = Nothing, Optional contentType As String = Nothing, Optional replyTo As String = Nothing, Optional scheduledEnqueueTime As DateTimeOffset = Nothing, Optional properties As IDictionary(Of String, Object) = Nothing, Optional lockTokenGuid As Guid = Nothing, Optional deliveryCount As Integer = 0, Optional lockedUntil As DateTimeOffset = Nothing, Optional sequenceNumber As Long = -1, Optional deadLetterSource As String = Nothing, Optional enqueuedSequenceNumber As Long = 0, Optional enqueuedTime As DateTimeOffset = Nothing, Optional serviceBusMessageState As ServiceBusMessageState = Azure.Messaging.ServiceBus.ServiceBusMessageState.Active) As ServiceBusReceivedMessage

Parameters

body
BinaryData

The binary data to assign as the value of Body.

messageId
String

The message identifier to assign as the value of MessageId.

partitionKey
String

The partition key to assign as the value of PartitionKey.

viaPartitionKey
String

The "via partition key" to assign as the value of TransactionPartitionKey.

sessionId
String

The session identifier to assign as the value of SessionId.

replyToSessionId
String

The "reply to" session identifier to assign as the value of ReplyToSessionId.

timeToLive
TimeSpan

The time interval to assign as the value of TimeToLive.

correlationId
String

The correlation identifier to assign as the value of CorrelationId.

subject
String

The subject to assign as the value of Subject.

to
String

The "to" value to assign as the value of To.

contentType
String

The content type to assign as the value of ContentType.

replyTo
String

The "reply to" value to assign as the value of ReplyTo.

scheduledEnqueueTime
DateTimeOffset

The time stamp to assign as the value of ScheduledEnqueueTime.

properties
IDictionary<String,Object>

The set of application properties to assign as the value of ApplicationProperties.

lockTokenGuid
Guid

The token to assign as the value of LockToken.

deliveryCount
Int32

The count to assign as the value of DeliveryCount.

lockedUntil
DateTimeOffset

The "locked until" time stamp to assign as the value of LockedUntil.

sequenceNumber
Int64

The sequence number to assign as the value of SequenceNumber.

deadLetterSource
String

The source to assign as the value of DeadLetterSource.

enqueuedSequenceNumber
Int64

The sequence number to assign as the value of EnqueuedSequenceNumber.

enqueuedTime
DateTimeOffset

The time stamp to assign as the value of EnqueuedTime.

serviceBusMessageState
ServiceBusMessageState

The state of the message to assign as the value of State.

Returns

The populated ServiceBusReceivedMessage instance to use for mocking.

Applies to