Skip to content

Work we can add later for ForeachToFor refactoring #25667

@heejaechang

Description

@heejaechang
  1. support ForEachVariableStatementSyntax for deconstruction
  2. [design question] should refactoring be offered even if refactoring can change semantic?
    (Foreach to For refactoring #25460 (review))
  3. [design question] what span refactoring should be offered?
  4. [design question] okay to delete comments in certain case?
  5. support embedded statement. (refactor introduce local variable service to actual service and use that in the refactoring) Foreach to For refactoring #25460 (comment)
  6. let people convert to for if the type implements indexer and either Length or Count
    Foreach to For refactoring #25460 (review)
  7. support multiple rename in refactoring
    Foreach to For refactoring #25460 (comment)
  8. [design question] how much formatting we will try to preserve
  9. [design question] ordering of caret based refactoring.
    Foreach to For refactoring #25460 (comment)
  • unlike diagnostic fixer, refactoring doesn't provide preferable span for refactoring so refactorings are not ordered. we might consider adding PreferalbeSpan to RefactoringProvider API so that we can order those.
  1. [design question] checking of ICodeRefactoringHelpersService in refactoring
  2. add support for ":" separated body of foreach in VB
  3. reuse as much existing token as possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions