SoapMessage.Stage 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取 SoapMessageStage 的 SoapMessage。
public:
property System::Web::Services::Protocols::SoapMessageStage Stage { System::Web::Services::Protocols::SoapMessageStage get(); };
public System.Web.Services.Protocols.SoapMessageStage Stage { get; }
member this.Stage : System.Web.Services.Protocols.SoapMessageStage
Public ReadOnly Property Stage As SoapMessageStage
属性值
SoapMessageStage 的 SoapMessage。
示例
下面的代码示例演示如何在 方法中SoapExtension.ProcessMessage确定 SoapMessageStage 。
public:
virtual void ProcessMessage( SoapMessage^ message ) override
{
switch ( message->Stage )
{
case SoapMessageStage::BeforeSerialize:
break;
case SoapMessageStage::AfterSerialize:
WriteOutput( message );
break;
case SoapMessageStage::BeforeDeserialize:
WriteInput( message );
break;
case SoapMessageStage::AfterDeserialize:
break;
}
}
public override void ProcessMessage(SoapMessage message) {
switch (message.Stage) {
case SoapMessageStage.BeforeSerialize:
break;
case SoapMessageStage.AfterSerialize:
WriteOutput( message );
break;
case SoapMessageStage.BeforeDeserialize:
WriteInput( message );
break;
case SoapMessageStage.AfterDeserialize:
break;
}
}
Public Overrides Sub ProcessMessage(message As SoapMessage)
Select Case message.Stage
Case SoapMessageStage.BeforeSerialize
Case SoapMessageStage.AfterSerialize
WriteOutput(message)
Case SoapMessageStage.BeforeDeserialize
WriteInput(message)
Case SoapMessageStage.AfterDeserialize
End Select
End Sub
注解
Stage可以在任何 SoapMessageStage处访问 属性。