SoapMessage.OneWay 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取一个值, OneWay 该值指示应用于 XML Web 服务方法的属性 SoapDocumentMethodAttribute 或 SoapRpcMethodAttribute 属性。
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 服务方法的属性SoapDocumentMethodAttribute为true或SoapRpcMethodAttribute已应用,则为 ;否则为 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访问。