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

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

private static DeleteIndex ( string IndexName ) : void
IndexName string
Результат void
        private static void DeleteIndex(string IndexName)
        {
            // Delete the index if it exists
            try
            {
                try
                {
                    Uri uri = new Uri(ServiceUri, "/indexes/" + IndexName);
                    HttpResponseMessage response = AzureSearchHelper.SendSearchRequest(HttpClient, HttpMethod.Delete, uri);
                    response.EnsureSuccessStatusCode();
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Error: {0}", ex.Message.ToString());
                }

            }
            catch (Exception ex)
            {
                Console.WriteLine("Error deleting index: {0}\r\n", ex.Message);
            }
        }