<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;

using EnvDTE;

using GoToInterfaceImplementation.Domain.Contracts.Editor;
using GoToInterfaceImplementation.Domain.EnvDte.Code;

namespace GoToInterfaceImplementation.Domain.EnvDte.Editor.Discoverers
{
    public class EnvDteParameterOfInterfaceTypeDiscoverer : EnvDteCodeElementDiscoverer
    {
        public EnvDteParameterOfInterfaceTypeDiscoverer(ICodeEditor codeEditor)
            : base(
            codeEditor,
            typeof(EnvDteParameterOfInterfaceType), 
            typeof(CodeParameter),
            vsCMElement.vsCMElementParameter)
        {
        }


        protected override bool IsApplicable(CodeElement codeElement)
        {
            return true;
        }
    }
}<commit_msg>Fixed bug that caused extension to fail upon click on non-interface method parameter.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;

using EnvDTE;

using GoToInterfaceImplementation.Domain.Contracts.Editor;
using GoToInterfaceImplementation.Domain.EnvDte.Code;

namespace GoToInterfaceImplementation.Domain.EnvDte.Editor.Discoverers
{
    public class EnvDteParameterOfInterfaceTypeDiscoverer : EnvDteCodeElementDiscoverer
    {
        public EnvDteParameterOfInterfaceTypeDiscoverer(ICodeEditor codeEditor)
            : base(
            codeEditor,
            typeof(EnvDteParameterOfInterfaceType), 
            typeof(CodeParameter),
            vsCMElement.vsCMElementParameter)
        {
        }


        protected override bool IsApplicable(CodeElement codeElement)
        {
            CodeParameter codeParameter = (CodeParameter)codeElement;
            return (codeParameter.Type.CodeType is CodeInterface);
        }
    }
}
{'fraction_non_alphanumeric': 0.05981941309255079, 'fraction_numerical': 0.0, 'mean_word_length': 3.1914893617021276, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4746023', 'n_tokens_mistral': 469, 'n_tokens_neox': 463, 'n_words': 83}