ICallContextInitializer.BeforeInvoke 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.
Implement to participate in the initialization of the operation thread.
public:
System::Object ^ BeforeInvoke(System::ServiceModel::InstanceContext ^ instanceContext, System::ServiceModel::IClientChannel ^ channel, System::ServiceModel::Channels::Message ^ message);
public object BeforeInvoke (System.ServiceModel.InstanceContext instanceContext, System.ServiceModel.IClientChannel channel, System.ServiceModel.Channels.Message message);
abstract member BeforeInvoke : System.ServiceModel.InstanceContext * System.ServiceModel.IClientChannel * System.ServiceModel.Channels.Message -> obj
Public Function BeforeInvoke (instanceContext As InstanceContext, channel As IClientChannel, message As Message) As Object
Parameters
- instanceContext
- InstanceContext
The service instance for the operation.
- channel
- IClientChannel
The client channel.
- message
- Message
The incoming message.
Returns
A correlation object passed back as the parameter of the AfterInvoke(Object) method.
Remarks
Implement the BeforeInvoke method to initialize and clean up thread-local storage for the thread that invokes user code. Typical usage is to set some value, such as impersonation or changing the System.Globalization.CultureInfo. If you wanted to establish some custom context, this is the extension point to initialize the static context property, which is then available for developers in the course of the operation.
Applies to
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk