WebHostBuilderExtensions.GetTestClient(IWebHost) 方法

定義

從主機服務中的 TestServer 擷取測試用戶端。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Net::Http::HttpClient ^ GetTestClient(Microsoft::AspNetCore::Hosting::IWebHost ^ host);
public static System.Net.Http.HttpClient GetTestClient (this Microsoft.AspNetCore.Hosting.IWebHost host);
static member GetTestClient : Microsoft.AspNetCore.Hosting.IWebHost -> System.Net.Http.HttpClient
<Extension()>
Public Function GetTestClient (host As IWebHost) As HttpClient

參數

host
IWebHost

傳回

適用於