你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

DataSourcesOperationsExtensions.ExistsAsync 方法

定义

确定搜索服务中是否存在给定的数据源。

public static System.Threading.Tasks.Task<bool> ExistsAsync (this Microsoft.Azure.Search.IDataSourcesOperations operations, string dataSourceName, Microsoft.Azure.Search.Models.SearchRequestOptions searchRequestOptions = default, System.Threading.CancellationToken cancellationToken = default);
static member ExistsAsync : Microsoft.Azure.Search.IDataSourcesOperations * string * Microsoft.Azure.Search.Models.SearchRequestOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
<Extension()>
Public Function ExistsAsync (operations As IDataSourcesOperations, dataSourceName As String, Optional searchRequestOptions As SearchRequestOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)

参数

operations
IDataSourcesOperations

此扩展方法的操作组。

dataSourceName
String

数据源的名称。

searchRequestOptions
SearchRequestOptions

操作的其他参数。

cancellationToken
CancellationToken

取消标记。

返回

如果该数据源存在,则为 true;否则为 false

适用于