IChannelReceiver.GetUrlsForUri(String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回 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 方法使用。