Skip to content

Port UseAutoPropertyCodeFixProvider to shared layer #43091

@mavasani

Description

@mavasani

This code fixer is currently using internal Rename APIs, which prevents porting it to shared layer (no IVTs to Workspaces/Features assemblies).

var fieldLocations = await Renamer.GetRenameLocationsAsync(
solution, SymbolAndProjectId.Create(fieldSymbol, fieldDocument.Project.Id),
solution.Options, cancellationToken).ConfigureAwait(false);
// First, create the updated property we want to replace the old property with
var isWrittenToOutsideOfConstructor = IsWrittenToOutsideOfConstructorOrProperty(fieldSymbol, fieldLocations, property, cancellationToken);
var updatedProperty = await UpdatePropertyAsync(
propertyDocument, compilation, fieldSymbol, propertySymbol, property,
isWrittenToOutsideOfConstructor, cancellationToken).ConfigureAwait(false);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions