コード例 #1
0
        /// <summary>
        /// Determines whether or not the given synonym map exists in the Azure Search service.
        /// </summary>
        /// <param name='operations'>
        /// The operations group for this extension method.
        /// </param>
        /// <param name="synonymMapName">
        /// The name of the synonym map.
        /// </param>
        /// <param name='searchRequestOptions'>
        /// Additional parameters for the operation.
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        /// <returns>
        /// <c>true</c> if the synonym map exists; <c>false</c> otherwise.
        /// </returns>
        public static async Task <bool> ExistsAsync(
            this ISynonymMapsOperations operations,
            string synonymMapName,
            SearchRequestOptions searchRequestOptions = default(SearchRequestOptions),
            CancellationToken cancellationToken       = default(CancellationToken))
        {
            AzureOperationResponse <bool> result = await operations.ExistsWithHttpMessagesAsync(synonymMapName, searchRequestOptions, null, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }