Beispiel #1
0
 public override IEnumerable <IContextAction> GetAvailableActions(EditorContext context)
 {
     // class
     foreach (var addUsingAction in RefactoringService.GetAddUsingActions(context.CurrentSymbol, context.Editor))
     {
         yield return(addUsingAction);
     }
     // extension method
     if (context.CurrentExpression.Context != ExpressionContext.Attribute)
     {
         foreach (var addUsingAction in GetAddUsingExtensionMethodActions(context))
         {
             yield return(addUsingAction);
         }
     }
     // attribute
     if (context.CurrentExpression.Context == ExpressionContext.Attribute)
     {
         foreach (var addUsingAction in GetAddUsingAttributeActions(context))
         {
             yield return(addUsingAction);
         }
     }
 }