C# Класс NServiceBus.MsmqConfigurationExtensions

Adds extensions methods to TransportExtensions{T} for configuration purposes.
Показать файл Открыть проект

Открытые методы

Метод Описание
ApplyLabelToMessages ( this transportExtensions, string>.Func labelGenerator ) : TransportExtensions

Set a delegate to use for applying the Message.Label property when sending a message.

This delegate will be used for all valid messages sent via MSMQ. This includes, not just standard messages, but also Audits, Errors and all control messages. In some cases it may be useful to use the Headers.ControlMessageHeader key to determine if a message is a control message. The only exception to this rule is received messages with corrupted headers. These messages will be forwarded to the error queue with no label applied.

InstanceMappingFile ( this config ) : InstanceMappingFileSettings

Returns the configuration options for the file based instance mapping file.

SetMessageDistributionStrategy ( this config, DistributionStrategy distributionStrategy ) : void

Sets a distribution strategy for a given endpoint.

TransactionScopeOptions ( this transportExtensions, System.TimeSpan timeout = null, IsolationLevel isolationLevel = null ) : TransportExtensions

Allows to change the transaction isolation level and timeout for the `TransactionScope` used to receive messages.

If not specified the default transaction timeout of the machine will be used and the isolation level will be set to `ReadCommited`.

Описание методов

ApplyLabelToMessages() публичный статический Метод

Set a delegate to use for applying the Message.Label property when sending a message.
This delegate will be used for all valid messages sent via MSMQ. This includes, not just standard messages, but also Audits, Errors and all control messages. In some cases it may be useful to use the Headers.ControlMessageHeader key to determine if a message is a control message. The only exception to this rule is received messages with corrupted headers. These messages will be forwarded to the error queue with no label applied.
public static ApplyLabelToMessages ( this transportExtensions, string>.Func labelGenerator ) : TransportExtensions
transportExtensions this
labelGenerator string>.Func
Результат TransportExtensions

InstanceMappingFile() публичный статический Метод

Returns the configuration options for the file based instance mapping file.
public static InstanceMappingFile ( this config ) : InstanceMappingFileSettings
config this
Результат InstanceMappingFileSettings

SetMessageDistributionStrategy() публичный статический Метод

Sets a distribution strategy for a given endpoint.
public static SetMessageDistributionStrategy ( this config, DistributionStrategy distributionStrategy ) : void
config this Config object.
distributionStrategy DistributionStrategy The instance of a distribution strategy.
Результат void

TransactionScopeOptions() публичный статический Метод

Allows to change the transaction isolation level and timeout for the `TransactionScope` used to receive messages.
If not specified the default transaction timeout of the machine will be used and the isolation level will be set to `ReadCommited`.
public static TransactionScopeOptions ( this transportExtensions, System.TimeSpan timeout = null, IsolationLevel isolationLevel = null ) : TransportExtensions
transportExtensions this
timeout System.TimeSpan
isolationLevel IsolationLevel
Результат TransportExtensions