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。
範例
下列程式碼範例示範如何判斷 SoapMessageStage 方法內的 SoapExtension.ProcessMessage 。
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 存取。