ChannelServices.GetUrlsForObject(MarshalByRefObject) Метод

Определение

Возвращает массив всех URL-адресов, которые могут быть использованы для доступа к указанному объекту.

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

Параметры

obj
MarshalByRefObject

Объект, для которого извлекается массив URL-адресов.

Возвращаемое значение

String[]

Массив строк, содержащий URL-адреса, которые могут быть использованы для удаленного определения объекта, или null, если ни один объект не найден.

Атрибуты

Исключения

У непосредственно вызывающего объекта отсутствует разрешение инфраструктуры.

Примеры

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

Применяется к