Exemple #1
0
        MethodExtractorBase GetCurrentExtractor(TextEditorControl editor)
        {
            switch (LanguageBindingService.GetCodonPerCodeFileName(editor.FileName).Language)
            {
            case "C#":
                return(new CSharpMethodExtractor(editor, editor.ActiveTextAreaControl.SelectionManager.SelectionCollection[0]));

            default:
                MessageService.ShowError(string.Format(StringParser.Parse("${res:AddIns.SharpRefactoring.ExtractMethodNotSupported}"), LanguageBindingService.GetCodonPerCodeFileName(editor.FileName).Language));
                return(null);
            }
        }