本文整理匯總了VB.NET中System.Runtime.Remoting.RemotingServices.GetObjRefForProxy方法的典型用法代碼示例。如果您正苦於以下問題:VB.NET RemotingServices.GetObjRefForProxy方法的具體用法?VB.NET RemotingServices.GetObjRefForProxy怎麽用?VB.NET RemotingServices.GetObjRefForProxy使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。
在下文中一共展示了RemotingServices.GetObjRefForProxy方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的VB.NET代碼示例。
示例1: Object
Dim objRefSample As ObjRef = RemotingServices.GetObjRefForProxy(myRemoteObject)
Console.WriteLine("***ObjRef Details***")
Console.WriteLine("URI:" + ControlChars.Tab + "{0}", objRefSample.URI)
Dim channelData As Object() = objRefSample.ChannelInfo.ChannelData
Console.WriteLine("Channel Info:")
Dim o As Object
For Each o In channelData
Console.WriteLine(ControlChars.Tab + "{0}", o.ToString())
Next o
Dim envoyInfo As IEnvoyInfo = objRefSample.EnvoyInfo
If envoyInfo Is Nothing Then
Console.WriteLine("This ObjRef does not have envoy information.")
Else
Dim envoySinks As IMessageSink = envoyInfo.EnvoySinks
Console.WriteLine("Envoy Sink Class: {0}", envoySinks)
End If
Dim typeInfo As IRemotingTypeInfo = objRefSample.TypeInfo
Console.WriteLine("Remote type name: {0}", typeInfo.TypeName)
Console.WriteLine("Can my object cast to a Bitmap? {0}", typeInfo.CanCastTo(GetType(System.Drawing.Bitmap), objRefSample))