public async Task DeleteProjectCustomField()

in src/YouTrackSharp/Projects/ProjectCustomFieldsService.cs [53:82]


        public async Task DeleteProjectCustomField(string projectId, string customFieldName)
        {
            if (string.IsNullOrEmpty(projectId))
            {
                throw new ArgumentNullException(nameof(projectId));
            }
            if (string.IsNullOrEmpty(customFieldName))
            {
                throw new ArgumentNullException(nameof(customFieldName));
            }

            var client = await _connection.GetAuthenticatedApiClient();

            CustomField field;
            try
            {
                field = await GetProjectCustomField(projectId, customFieldName);
            }
            catch (YouTrackErrorException e)
            {
                if (e.StatusCode == (int)HttpStatusCode.NotFound)
                {
                    return;
                }

                throw;
            }
            
            await client.AdminProjectsCustomfieldsDeleteAsync(projectId, field.Id);
        }