共用方式為


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 方法使用。

適用於