Example #1
0
        public virtual void Refactor()
        {
            var activeSelection = SelectionProvider.ActiveSelection();

            if (!activeSelection.HasValue)
            {
                throw new NoActiveSelectionException();
            }

            Refactor(activeSelection.Value);
        }
 private Func <T> FromActiveSelection <T>(Func <QualifiedSelection, T> func)
     where T : class
 {
     return(() =>
     {
         var activeSelection = _selectionProvider.ActiveSelection();
         return activeSelection.HasValue
             ? func(activeSelection.Value)
             : null;
     });
 }
 private bool SpecializedEvaluateCanExecute(object parameter)
 {
     return(SelectionProvider.ActiveSelection().HasValue);
 }