本文整理汇总了VB.NET中System.Runtime.Remoting.RemotingServices.IsOneWay方法的典型用法代码示例。如果您正苦于以下问题:VB.NET RemotingServices.IsOneWay方法的具体用法?VB.NET RemotingServices.IsOneWay怎么用?VB.NET RemotingServices.IsOneWay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。
在下文中一共展示了RemotingServices.IsOneWay方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: HelloServer
Public Class HelloServer
Inherits MarshalByRefObject
Shared Sub New()
Console.WriteLine("HelloServer activated.")
End Sub
<OneWay()> Public Sub SayHelloToServer(ByVal name As String)
Console.WriteLine("Client invoked SayHelloToServer(""{0}"").", name)
End Sub
'IsOneWay
' Note the lack of the OneWayAttribute adornment on this method.
<SecurityPermission(SecurityAction.Demand)> _
Public Function SayHelloToServerAndWait(ByVal name As String) As String
Console.WriteLine("Client invoked SayHelloToServerAndWait(""{0}"").", name)
Console.WriteLine( _
"Client waiting for return? {0}", _
IIf(RemotingServices.IsOneWay(MethodBase.GetCurrentMethod()), "No", "Yes") _
)
Return "Hi there, " + name + "."
End Function
End Class