SoapMessage.EnsureStage(SoapMessageStage) 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.
Ensures that the SoapMessageStage of the call to the XML Web service method is the stage or stages passed in. If the current processing stage is not one of the stages passed in, an exception is thrown.
protected:
void EnsureStage(System::Web::Services::Protocols::SoapMessageStage stage);
protected void EnsureStage (System.Web.Services.Protocols.SoapMessageStage stage);
member this.EnsureStage : System.Web.Services.Protocols.SoapMessageStage -> unit
Protected Sub EnsureStage (stage As SoapMessageStage)
Parameters
- stage
- SoapMessageStage
The SoapMessageStage asserted.
Exceptions
The current SoapMessageStage is not the asserted stage or stages.
Examples
The following example asserts that the current SoapMessageStage is either BeforeSerialize or BeforeDeserialize; if it is not, an exception is thrown.
EnsureStage( (SoapMessageStage)( SoapMessageStage::BeforeSerialize |
SoapMessageStage::BeforeDeserialize ) );
EnsureStage(SoapMessageStage.BeforeSerialize | SoapMessageStage.BeforeDeserialize);
EnsureStage((SoapMessageStage.BeforeSerialize Or SoapMessageStage.BeforeDeserialize))
End Sub
Remarks
Multiple stages can be asserted by performing a bitwise OR operation on multiple instances of the SoapMessageStage class.
EnsureStage can be called during any SoapMessageStage.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기