共用方式為


SoapMessage.OneWay 屬性

定義

取得值,指出套用至 XML Web Service 方法之 OneWaySoapDocumentMethodAttribute 屬性 (Attribute) 的 SoapRpcMethodAttribute 屬性 (Property)。

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

屬性值

如果已套用至 XML Web Service 方法之 OneWaySoapDocumentMethodAttributeSoapRpcMethodAttribute 屬性為 true,則為 true,否則為 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

備註

如需單向 XML Web 服務方法的詳細資訊, SoapDocumentMethodAttribute.OneWay 請參閱 或 SoapRpcMethodAttribute 的 屬性 SoapDocumentMethodAttribute

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

適用於

另請參閱