ChannelServices.GetUrlsForObject(MarshalByRefObject) Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Devolve um array de todas as URLs que podem ser usadas para alcançar o objeto especificado.
public:
static cli::array <System::String ^> ^ GetUrlsForObject(MarshalByRefObject ^ obj);
public static string[] GetUrlsForObject(MarshalByRefObject obj);
[System.Security.SecurityCritical]
public static string[] GetUrlsForObject(MarshalByRefObject obj);
static member GetUrlsForObject : MarshalByRefObject -> string[]
[<System.Security.SecurityCritical>]
static member GetUrlsForObject : MarshalByRefObject -> string[]
Public Shared Function GetUrlsForObject (obj As MarshalByRefObject) As String()
Parâmetros
O objeto para recuperar o array de URLs.
Devoluções
Um array de cadeias que contém as URLs que podem ser usadas para identificar remotamente o objeto, ou null se não foram encontradas nenhumas.
- Atributos
Exceções
O interlocutor imediato não tem autorização para infraestruturas.
Exemplos
array<String^>^myURLArray = ChannelServices::GetUrlsForObject( myHelloServer );
Console::WriteLine( "Number of URLs for the specified Object: {0}", myURLArray->Length );
for ( int iIndex = 0; iIndex < myURLArray->Length; iIndex++ )
Console::WriteLine( "URL: {0}", myURLArray[ iIndex ] );
string[] myURLArray = ChannelServices.GetUrlsForObject(myHelloServer);
Console.WriteLine("Number of URLs for the specified Object: "
+myURLArray.Length);
for (int iIndex=0; iIndex<myURLArray.Length; iIndex++)
Console.WriteLine("URL: "+myURLArray[iIndex]);
Dim myURLArray As String() = ChannelServices.GetUrlsForObject(myHelloServer)
Console.WriteLine("Number of URLs for the specified Object: " + _
myURLArray.Length.ToString())
Dim iIndex As Integer
For iIndex = 0 To myURLArray.Length - 1
Console.WriteLine("URL: " + myURLArray(iIndex))
Next iIndex