<commit_before>﻿using System.Threading.Tasks;
using GitMind.GitModel;
using GitMind.Utils.UI;


namespace GitMind.Features.Branches
{
	internal class DeleteBranchCommand : Command<Branch>
	{
		private readonly IBranchService branchService;


		public DeleteBranchCommand(IBranchService branchService)
		{
			this.branchService = branchService;
		}


		protected override Task RunAsync(Branch branch)
		{
			branchService.DeleteBranch(branch);

			return Task.CompletedTask;
		}

		protected override bool CanRun(Branch branch) => branch.IsActive;
	}
}<commit_msg>Fix DeleteBranchCommand error<commit_after>﻿using System.Threading.Tasks;
using GitMind.GitModel;
using GitMind.Utils.UI;


namespace GitMind.Features.Branches
{
	internal class DeleteBranchCommand : Command<Branch>
	{
		private readonly IBranchService branchService;


		public DeleteBranchCommand(IBranchService branchService)
		{
			this.branchService = branchService;
		}


		protected override Task RunAsync(Branch branch)
		{
			branchService.DeleteBranch(branch);

			return Task.CompletedTask;
		}

		protected override bool CanRun(Branch branch) => branch?.IsActive ?? false;
	}
}
{'fraction_non_alphanumeric': 0.08072916666666667, 'fraction_numerical': 0.0, 'mean_word_length': 5.1005291005291005, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6533302', 'n_tokens_mistral': 371, 'n_tokens_neox': 340, 'n_words': 73}