本文整理汇总了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))