通过


SoapMessage.OneWay 属性

定义

获取一个值, OneWay 该值指示应用于 XML Web 服务方法的属性 SoapDocumentMethodAttributeSoapRpcMethodAttribute 属性。

public:
 abstract property bool OneWay { bool get(); };
public abstract bool OneWay { get; }
member this.OneWay : bool
Public MustOverride ReadOnly Property OneWay As Boolean

属性值

true OneWay如果 XML Web 服务方法的属性SoapDocumentMethodAttributetrueSoapRpcMethodAttribute已应用,则为 ;否则为 false

示例

if ( message->OneWay )
{
   myStreamWriter->WriteLine(
      "The method invoked on the client shall not wait"
      + " till the server finishes" );
}
else
{
   myStreamWriter->WriteLine(
      "The method invoked on the client shall wait"
      + " till the server finishes" );
}
if(message.OneWay)
   myStreamWriter.WriteLine(
      "The method invoked on the client shall not wait"
      + " till the server finishes");
else
   myStreamWriter.WriteLine(
      "The method invoked on the client shall wait"
      + " till the server finishes");
If message.OneWay Then
   myStreamWriter.WriteLine( _
      "The method invoked on the client shall not wait" & _
      " till the server finishes")
Else
   myStreamWriter.WriteLine( _
      "The method invoked on the client shall wait" & _
      " till the server finishes")
End If

注解

SoapDocumentMethodAttribute.OneWay有关单向 XML Web 服务方法的详细信息,请参阅或SoapRpcMethodAttribute了解其属性SoapDocumentMethodAttribute

OneWay 属性可在所有阶段 SoapMessageStage访问。

适用于

另请参阅