Skip to content

Commit f9dc081

Browse files
Use non-deprecated API
1 parent e0bb3ec commit f9dc081

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

CodeConverter/CSharp/CommonConversions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ public static CSSyntax.VariableDeclaratorSyntax CreateVariableDeclarator(string
569569
{
570570
if (operation is IPropertyReferenceOperation pro && pro.Arguments.Any() &&
571571
!VisualBasicExtensions.IsDefault(pro.Property)) {
572-
var isSetter = pro.Parent.Kind == OperationKind.SimpleAssignment && pro.Parent.Children.First() == pro;
572+
var isSetter = pro.Parent.Kind == OperationKind.SimpleAssignment && pro.Parent.ChildOperations.First() == pro;
573573
var extraArg = isSetter
574574
? await GetParameterizedSetterArgAsync(operation)
575575
: null;

CodeConverter/CSharp/ProjectMergedDeclarationExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ private static async Task<Project> RenamePrefixAsync(Project project, string old
164164
for (var symbolToRename = await GetElementToRename(project); symbolToRename != null; symbolToRename = await GetElementToRename(project, toSkip)) {
165165
string newName = symbolToRename.Name.Replace(oldNamePrefix, newNamePrefix);
166166
try {
167-
var renamedSolution = await Renamer.RenameSymbolAsync(project.Solution, symbolToRename, newName, project.Solution.Workspace.Options, cancellationToken);
167+
var renamedSolution = await Renamer.RenameSymbolAsync(project.Solution, symbolToRename, new SymbolRenameOptions(), newName, cancellationToken);
168168
project = renamedSolution.GetProject(project.Id);
169169
} catch (Exception e) {
170170
toSkip++;

CodeConverter/Common/SymbolRenamer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static async Task<Project> PerformRenamesAsync(Project project, IEnumerab
3535
ISymbol currentDeclaration = SymbolFinder.FindSimilarSymbols(originalSymbol, compilation).FirstOrDefault();
3636
if (currentDeclaration == null)
3737
continue; //Must have already renamed this symbol for a different reason
38-
solution = await Renamer.RenameSymbolAsync(solution, currentDeclaration, newName, solution.Workspace.Options);
38+
solution = await Renamer.RenameSymbolAsync(solution, currentDeclaration, new SymbolRenameOptions(), newName, cancellationToken);
3939
}
4040

4141
return solution.GetProject(project.Id);

0 commit comments

Comments
 (0)