本文整理汇总了VB.NET中System.Runtime.Remoting.ActivatedServiceTypeEntry类的典型用法代码示例。如果您正苦于以下问题:VB.NET ActivatedServiceTypeEntry类的具体用法?VB.NET ActivatedServiceTypeEntry怎么用?VB.NET ActivatedServiceTypeEntry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ActivatedServiceTypeEntry类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: MyClient
' 导入命名空间
Imports System.Runtime.Remoting
Imports System.Runtime.Remoting.Channels
Imports System.Runtime.Remoting.Channels.Tcp
Public Class MyClient
Public Shared Sub Main()
ChannelServices.RegisterChannel(New TcpChannel(8082))
' Create an instance of 'ActivatedServiceTypeEntry' class
' which holds the values for 'HelloServer' type.
Dim myActivatedServiceTypeEntry As New ActivatedServiceTypeEntry(GetType(HelloServer))
' Register an object Type on the service end so that
' it can be activated on request from a client.
RemotingConfiguration.RegisterActivatedServiceType(myActivatedServiceTypeEntry)
' Get the registered activated service types .
Dim myActivatedServiceEntries As ActivatedServiceTypeEntry() = RemotingConfiguration. _
GetRegisteredActivatedServiceTypes()
Console.WriteLine("Information of first registered activated " + " service type :")
Console.WriteLine("Object type: " + myActivatedServiceEntries(0).ObjectType.ToString())
Console.WriteLine("Description: " + myActivatedServiceEntries(0).ToString())
Console.WriteLine("Press enter to stop this process")
Console.ReadLine()
End Sub
End Class