AngularAzureSearch.DataIndexer.Program.DeleteIndex C# (CSharp) Метод

DeleteIndex() приватный статический Метод

private static DeleteIndex ( string indexName ) : bool
indexName string
Результат bool
        private static bool DeleteIndex(string indexName)
        {
            // Delete the index if it exists
            try
            {
                _searchClient.Indexes.Delete(indexName);
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error deleting index: {0}\r\n", ex.Message.ToString());
                Console.WriteLine("Did you remember to add your SearchServiceName and SearchServiceApiKey to the app.config?\r\n");
                return false;
            }

            return true;
        }