SolutionExtensions.InfoBarService.ShowInfoBar C# (CSharp) Method

ShowInfoBar() public method

public ShowInfoBar ( SolutionExtensions.SuggestionResult result, string fileType ) : void
result SolutionExtensions.SuggestionResult
fileType string
return void
        public void ShowInfoBar(SuggestionResult result, string fileType)
        {
            if (Settings.IsFileTypeIgnored(result.Matches))
                return;

            _fileType = fileType;
            int count = result.Extensions.Count(e => e.Category != SuggestionFileModel.GENERAL);

            var host = GetInfoBarHost(fileType);

            if (host != null)
            {
                string matches = string.Join(", ", result.Matches.Distinct());
                string message = $"{count} extensions supporting {matches} files are found";

                if (result.Extensions.Count() == 1)
                    message = $"{count} extension supporting {matches} files is found";

                _suggestionResult = result;
                CreateInfoBar(host, message);
            }
        }