IChannelReceiver.GetUrlsForUri(String) 方法

定义

为 URI 返回所有 URL 的数组。

public:
 cli::array <System::String ^> ^ GetUrlsForUri(System::String ^ objectURI);
public string[] GetUrlsForUri (string objectURI);
[System.Security.SecurityCritical]
public string[] GetUrlsForUri (string objectURI);
abstract member GetUrlsForUri : string -> string[]
[<System.Security.SecurityCritical>]
abstract member GetUrlsForUri : string -> string[]
Public Function GetUrlsForUri (objectURI As String) As String()

参数

objectURI
String

要求 URL 的 URI。

返回

String[]

URL 的数组。

属性

例外

直接调用方没有基础结构权限。

示例

// Create and send the object URL.
virtual array<String^>^ GetUrlsForUri( String^ objectURI )
{
   array<String^>^myString = gcnew array<String^>(1);
   myString[ 0 ] = String::Concat( Dns::Resolve( Dns::GetHostName() )->AddressList[ 0 ], "/", objectURI );
   return myString;
}
// Create and send the object URL.
public string[] GetUrlsForUri(string objectURI)
{
   string[] myString = new string[1];
   myString[0] = Dns.Resolve(Dns.GetHostName()).AddressList[0]
                                                      + "/" + objectURI;
   return myString;
}
' Create and send the object URL.
Public Function GetUrlsForUri(ByVal objectURI As String) As String() _
                                          Implements IChannelReceiver.GetUrlsForUri
   Dim myString(0) As String
   myString(0) = Dns.Resolve(Dns.GetHostName()).AddressList(0).ToString() + "/" + objectURI
   Return myString
End Function 'GetUrlsForUri

注解

此方法由 ChannelServices.GetUrlsForObject 方法使用。

适用于