共用方式為


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

屬性值

trueOneWay 或 的屬性SoapDocumentMethodAttribute應用於 XML Web 服務方法為 true;否則, falseSoapRpcMethodAttribute

範例

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

備註

有關單向 XML Web 服務方法的詳細資訊,請參閱 SoapDocumentMethodAttribute.OneWaySoapRpcMethodAttribute 的屬性SoapDocumentMethodAttribute

OneWay 屬性在所有 SoapMessageStage階段均可存取。

適用於

另請參閱