SoapMessage.Stage Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the SoapMessageStage of the SoapMessage.

Namespace:   System.Web.Services.Protocols
Assembly:  System.Web.Services (in System.Web.Services.dll)

public SoapMessageStage Stage { get; }

The Stage property can be accessed at any SoapMessageStage.

The following code example demonstrates how to determine the SoapMessageStage within the SoapExtension.ProcessMessage method.

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;

        }
}

.NET Framework
Available since 1.1
Return to top
Show: