提交 90e1ea6f 编写于 作者: C Cyrus Najmabadi

Pass options

上级 40caf8af
......@@ -316,11 +316,12 @@ protected static async Task<Solution> AddPropertyAsync(Document document, Soluti
var fieldDeclaration = field.DeclaringSyntaxReferences.First();
var options = new CodeGenerationOptions(
contextLocation: fieldDeclaration.SyntaxTree.GetLocation(fieldDeclaration.Span),
parseOptions: fieldDeclaration.SyntaxTree.Options);
parseOptions: fieldDeclaration.SyntaxTree.Options,
options: await document.GetOptionsAsync(cancellationToken).ConfigureAwait(false));
var destination = field.ContainingType;
var updatedDocument = await codeGenerationService.AddPropertyAsync(destinationSolution, destination, property, options, cancellationToken)
.ConfigureAwait(false);
var updatedDocument = await codeGenerationService.AddPropertyAsync(
destinationSolution, destination, property, options, cancellationToken).ConfigureAwait(false);
updatedDocument = await Formatter.FormatAsync(updatedDocument, Formatter.Annotation, cancellationToken: cancellationToken).ConfigureAwait(false);
updatedDocument = await Simplifier.ReduceAsync(updatedDocument, cancellationToken: cancellationToken).ConfigureAwait(false);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册