TransactionMessageProperty.Set(Transaction, Message) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the transaction that will be used when executing the service method.
public:
static void Set(System::Transactions::Transaction ^ transaction, System::ServiceModel::Channels::Message ^ message);
public static void Set (System.Transactions.Transaction transaction, System.ServiceModel.Channels.Message message);
static member Set : System.Transactions.Transaction * System.ServiceModel.Channels.Message -> unit
Public Shared Sub Set (transaction As Transaction, message As Message)
Parameters
- transaction
- Transaction
The transaction that will be used when executing the service method.
- message
- Message
The incoming message that results in calling the service method.
Exceptions
The property has already been set on message
.
transaction
needs to be unmarshaled, and that operation fails.
Remarks
A custom incoming channel (which is part of a service's channel stack) can call this method to add a TransactionMessageProperty, containing the transaction
parameter, to the Properties
collection of the message
parameter. This prompts the infrastructure to create a TransactionScope instance using the transaction passed in, before calling the service method requested in the incoming message. The service method must have the TransactionScopeRequired property set to true
.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기