ILocationService interface
場所を取得するための外部コンテンツのサービス
メソッド
| get |
指定されたRESTリソース領域のURLを取得します |
| get |
特定のホストタイプでのリモートサービスの場所を取得します。 |
| route |
指定したルートテンプレートとパラメータのURLを作成します。 URL にはホスト パスが含まれます。 たとえば、ページのURLが https://dev.azure.com/foo で、プロジェクト「bar」の管理設定URLを作成しようとすると、出力は/foo/bar/_adminになります。 これにより、ページデータに含まれていない場合、ルートコントリビューションが非同期的に取得されます。 |
メソッドの詳細
getResourceAreaLocation(string)
指定されたRESTリソース領域のURLを取得します
function getResourceAreaLocation(resourceAreaId: string): Promise<string>
パラメーター
- resourceAreaId
-
string
リソース領域の ID
戻り値
Promise<string>
getServiceLocation(string, TeamFoundationHostType)
特定のホストタイプでのリモートサービスの場所を取得します。
function getServiceLocation(serviceInstanceType?: string, hostType?: TeamFoundationHostType): Promise<string>
パラメーター
- serviceInstanceType
-
string
ルックアップするサービス・インスタンス・タイプのGUID
- hostType
- TeamFoundationHostType
ルックアップするホスト・タイプ (デフォルトは、現在のページ・データのホスト・タイプ)
戻り値
Promise<string>
routeUrl(string, {[key: string]: string}, string)
指定したルートテンプレートとパラメータのURLを作成します。 URL にはホスト パスが含まれます。 たとえば、ページのURLが https://dev.azure.com/foo で、プロジェクト「bar」の管理設定URLを作成しようとすると、出力は/foo/bar/_adminになります。
これにより、ページデータに含まれていない場合、ルートコントリビューションが非同期的に取得されます。
function routeUrl(routeId: string, routeValues?: {[key: string]: string}, hostPath?: string): Promise<string>
パラメーター
- routeId
-
string
ルートの貢献度の ID
- routeValues
-
{[key: string]: string}
ルート値の置換
- hostPath
-
string
ページのデフォルトのホストパスではなく、使用するオプションのホストパス。
戻り値
Promise<string>