RemotingConfiguration.IsWellKnownClientType Método

Definição

Verifica se o tipo de objeto especificado está registrado como um tipo de cliente conhecido.Checks whether the specified object type is registered as a well-known client type.

Sobrecargas

IsWellKnownClientType(Type)

Verifica se o Type de objeto especificado está registrado como um tipo de cliente conhecido.Checks whether the specified object Type is registered as a well-known client type.

IsWellKnownClientType(String, String)

Verifica se o objeto especificado por seu nome de tipo e o nome do assembly é registrado como um tipo de cliente conhecido.Checks whether the object specified by its type name and assembly name is registered as a well-known client type.

IsWellKnownClientType(Type)

Verifica se o Type de objeto especificado está registrado como um tipo de cliente conhecido.Checks whether the specified object Type is registered as a well-known client type.

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

Parâmetros

svrType
Type

O objeto Type a ser verificado.The object Type to check.

Retornos

WellKnownClientTypeEntry

O WellKnownClientTypeEntry que corresponde ao tipo de objeto especificado.The WellKnownClientTypeEntry that corresponds to the specified object type.

Exceções

Pelo menos um dos chamadores no topo da pilha de chamadas não tem permissão para configurar canais e tipos de comunicação remota.At least one of the callers higher in the callstack does not have permission to configure remoting types and channels.

Exemplos

// 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)

Aplica-se a

IsWellKnownClientType(String, String)

Verifica se o objeto especificado por seu nome de tipo e o nome do assembly é registrado como um tipo de cliente conhecido.Checks whether the object specified by its type name and assembly name is registered as a well-known client type.

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

Parâmetros

typeName
String

O nome do tipo do objeto a ser verificado.The type name of the object to check.

assemblyName
String

O nome do assembly do objeto a ser verificado.The assembly name of the object to check.

Retornos

WellKnownClientTypeEntry

O WellKnownClientTypeEntry que corresponde ao tipo de objeto especificado.The WellKnownClientTypeEntry that corresponds to the specified object type.

Exceções

Pelo menos um dos chamadores no topo da pilha de chamadas não tem permissão para configurar canais e tipos de comunicação remota.At least one of the callers higher in the callstack does not have permission to configure remoting types and channels.

Exemplos

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)

Aplica-se a