SoapMessage.OneWay 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
會取得一個值,表示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 或 的屬性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.OneWay 或 SoapRpcMethodAttribute 的屬性SoapDocumentMethodAttribute。
該 OneWay 屬性在所有 SoapMessageStage階段均可存取。