RemotingConfiguration.IsWellKnownClientType Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Memeriksa apakah jenis objek yang ditentukan terdaftar sebagai jenis klien terkenal.
Overload
IsWellKnownClientType(Type) |
Memeriksa apakah objek Type yang ditentukan terdaftar sebagai jenis klien terkenal. |
IsWellKnownClientType(String, String) |
Memeriksa apakah objek yang ditentukan oleh nama jenis dan nama rakitannya terdaftar sebagai jenis klien terkenal. |
IsWellKnownClientType(Type)
Memeriksa apakah objek Type yang ditentukan terdaftar sebagai jenis klien terkenal.
public:
static System::Runtime::Remoting::WellKnownClientTypeEntry ^ IsWellKnownClientType(Type ^ svrType);
public static System.Runtime.Remoting.WellKnownClientTypeEntry IsWellKnownClientType (Type svrType);
static member IsWellKnownClientType : Type -> System.Runtime.Remoting.WellKnownClientTypeEntry
Public Shared Function IsWellKnownClientType (svrType As Type) As WellKnownClientTypeEntry
Parameter
Mengembalikan
WellKnownClientTypeEntry yang sesuai dengan jenis objek yang ditentukan.
Pengecualian
Setidaknya salah satu penelepon yang lebih tinggi di tumpukan panggilan tidak memiliki izin untuk mengonfigurasi jenis jarak jauh dan saluran.
Contoh
// Check whether the specified object type is registered as
// well known client type or not.
WellKnownClientTypeEntry^ myWellKnownClientType = RemotingConfiguration::IsWellKnownClientType( MyServerImpl::typeid );
Console::WriteLine( "The Object type is {0}", myWellKnownClientType->ObjectType );
Console::WriteLine( "The Object Url is {0}", myWellKnownClientType->ObjectUrl );
// Check whether the specified object type is registered as
// well known client type or not.
WellKnownClientTypeEntry myWellKnownClientType =
RemotingConfiguration.IsWellKnownClientType(typeof(MyServerImpl));
Console.WriteLine("The Object type is "
+myWellKnownClientType.ObjectType);
Console.WriteLine("The Object Url is "
+myWellKnownClientType.ObjectUrl);
' Check whether the specified object type is registered as
' well known client type or not.
Dim myWellKnownClientType As WellKnownClientTypeEntry = _
RemotingConfiguration.IsWellKnownClientType(GetType(MyServerImpl))
Console.WriteLine("The Object type is " + myWellKnownClientType.ObjectType.ToString())
Console.WriteLine("The Object Url is " + myWellKnownClientType.ObjectUrl)
Lihat juga
Berlaku untuk
IsWellKnownClientType(String, String)
Memeriksa apakah objek yang ditentukan oleh nama jenis dan nama rakitannya terdaftar sebagai jenis klien terkenal.
public:
static System::Runtime::Remoting::WellKnownClientTypeEntry ^ IsWellKnownClientType(System::String ^ typeName, System::String ^ assemblyName);
public static System.Runtime.Remoting.WellKnownClientTypeEntry IsWellKnownClientType (string typeName, string assemblyName);
static member IsWellKnownClientType : string * string -> System.Runtime.Remoting.WellKnownClientTypeEntry
Public Shared Function IsWellKnownClientType (typeName As String, assemblyName As String) As WellKnownClientTypeEntry
Parameter
- typeName
- String
Nama jenis objek yang akan diperiksa.
- assemblyName
- String
Nama rakitan objek yang akan diperiksa.
Mengembalikan
WellKnownClientTypeEntry yang sesuai dengan jenis objek yang ditentukan.
Pengecualian
Setidaknya salah satu penelepon yang lebih tinggi di tumpukan panggilan tidak memiliki izin untuk mengonfigurasi jenis jarak jauh dan saluran.
Contoh
MyServerImpl ^ myObject = gcnew MyServerImpl;
// Get the assembly for the 'MyServerImpl' object.
Assembly^ myAssembly = Assembly::GetAssembly( MyServerImpl::typeid );
AssemblyName^ myName = myAssembly->GetName();
// Check whether the specified object type is registered as
// well-known client type.
WellKnownClientTypeEntry^ myWellKnownClientType = RemotingConfiguration::IsWellKnownClientType( MyServerImpl::typeid->FullName, myName->Name );
Console::WriteLine( "The Object type :{0}", myWellKnownClientType->ObjectType );
Console::WriteLine( "The Object Uri :{0}", myWellKnownClientType->ObjectUrl );
MyServerImpl myObject = new MyServerImpl();
// Get the assembly for the 'MyServerImpl' object.
Assembly myAssembly = Assembly.GetAssembly(typeof(MyServerImpl));
AssemblyName myName = myAssembly.GetName();
// Check whether the specified object type is registered as
// well-known client type.
WellKnownClientTypeEntry myWellKnownClientType =
RemotingConfiguration.IsWellKnownClientType(
(typeof(MyServerImpl)).FullName,myName.Name);
Console.WriteLine("The Object type :"
+myWellKnownClientType.ObjectType);
Console.WriteLine("The Object Uri :"
+myWellKnownClientType.ObjectUrl);
Dim myObject As New MyServerImpl()
' Get the assembly for the 'MyServerImpl' object.
Dim myAssembly As [Assembly] = [Assembly].GetAssembly(GetType(MyServerImpl))
Dim myName As AssemblyName = myAssembly.GetName()
' Check whether the specified object type is registered as
' well-known client type.
Dim myWellKnownClientType As WellKnownClientTypeEntry = _
RemotingConfiguration.IsWellKnownClientType(GetType(MyServerImpl).FullName, myName.Name)
Console.WriteLine("The Object type :" + myWellKnownClientType.ObjectType.ToString())
Console.WriteLine("The Object Uri :" + myWellKnownClientType.ObjectUrl)