SoapMessage.Stage Property

Definition

Gets the SoapMessageStage of the SoapMessage.

C#
public System.Web.Services.Protocols.SoapMessageStage Stage { get; }

Property Value

The SoapMessageStage of the SoapMessage.

Examples

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

C#
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;
        }
}

Remarks

The Stage property can be accessed at any SoapMessageStage.

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1