IInstanceContextProvider.InitializeInstanceContext 方法

定义

nullGetExistingInstanceContext(Message, IContextChannel) 方法返回时调用。

public:
 void InitializeInstanceContext(System::ServiceModel::InstanceContext ^ instanceContext, System::ServiceModel::Channels::Message ^ message, System::ServiceModel::IContextChannel ^ channel);
public void InitializeInstanceContext (System.ServiceModel.InstanceContext instanceContext, System.ServiceModel.Channels.Message message, System.ServiceModel.IContextChannel channel);
abstract member InitializeInstanceContext : System.ServiceModel.InstanceContext * System.ServiceModel.Channels.Message * System.ServiceModel.IContextChannel -> unit
Public Sub InitializeInstanceContext (instanceContext As InstanceContext, message As Message, channel As IContextChannel)

参数

instanceContext
InstanceContext

新的 InstanceContext 对象。

message
Message

传入消息。

channel
IContextChannel

接收消息的通道。

注解

InitializeInstanceContext 返回 GetExistingInstanceContext 并创建了新的 null 对象时,调用 InstanceContext。 调用此方法是为了通知您创建了新的 InstanceContext

适用于