public static async Task ComputeRefactoringAsync(RefactoringContext context, MemberAccessExpressionSyntax memberAccess) { if (context.IsRefactoringEnabled(RefactoringIdentifiers.AddUsingStaticDirective)) { await AddUsingStaticDirectiveRefactoring.ComputeRefactoringsAsync(context, memberAccess).ConfigureAwait(false); } if (context.IsRefactoringEnabled(RefactoringIdentifiers.WrapCallChain)) { await WrapCallChainRefactoring.ComputeRefactoringsAsync(context, memberAccess).ConfigureAwait(false); } if (context.IsRefactoringEnabled(RefactoringIdentifiers.ConvertMethodGroupToLambda)) { await ConvertMethodGroupToLambdaRefactoring.ComputeRefactoringAsync(context, memberAccess).ConfigureAwait(false); } }
public static async Task ComputeRefactoringsAsync(RefactoringContext context, IdentifierNameSyntax identifierName) { if (context.IsRefactoringEnabled(RefactoringDescriptors.SyncPropertyNameAndBackingFieldName)) { await SyncPropertyNameAndBackingFieldNameAsync(context, identifierName).ConfigureAwait(false); } if (context.IsRefactoringEnabled(RefactoringDescriptors.AddUsingDirective) && context.Span.IsEmpty) { await AddUsingDirectiveRefactoring.ComputeRefactoringsAsync(context, identifierName).ConfigureAwait(false); } if (context.IsRefactoringEnabled(RefactoringDescriptors.InlineProperty)) { await InlinePropertyRefactoring.ComputeRefactoringsAsync(context, identifierName).ConfigureAwait(false); } if (context.IsRefactoringEnabled(RefactoringDescriptors.ConvertMethodGroupToLambda)) { await ConvertMethodGroupToLambdaRefactoring.ComputeRefactoringAsync(context, identifierName).ConfigureAwait(false); } }
public static async Task ComputeRefactoringAsync(RefactoringContext context, MemberAccessExpressionSyntax memberAccess) { if (context.IsRefactoringEnabled(RefactoringIdentifiers.AddUsingStaticDirective)) { await AddUsingStaticDirectiveRefactoring.ComputeRefactoringsAsync(context, memberAccess).ConfigureAwait(false); } if (context.IsRefactoringEnabled(RefactoringIdentifiers.FormatExpressionChain)) { await FormatExpressionChainRefactoring.ComputeRefactoringsAsync(context, memberAccess).ConfigureAwait(false); } if (context.IsRefactoringEnabled(RefactoringIdentifiers.UseEmptyStringLiteralInsteadOfStringEmpty)) { SemanticModel semanticModel = await context.GetSemanticModelAsync().ConfigureAwait(false); UseEmptyStringLiteralInsteadOfStringEmpty(context, semanticModel, memberAccess); } if (context.IsRefactoringEnabled(RefactoringIdentifiers.ConvertMethodGroupToLambda)) { await ConvertMethodGroupToLambdaRefactoring.ComputeRefactoringAsync(context, memberAccess).ConfigureAwait(false); } }