public IndentationResult GetIndentation(Document document, int lineNumber, FormattingOptions.IndentStyle indentStyle, CancellationToken cancellationToken) { var result = _service.GetDesiredIndentation(document, lineNumber, cancellationToken); if (result.HasValue) { return(new IndentationResult(result.Value.BasePosition, result.Value.Offset)); } else { return(default);
public IndentationResult?GetDesiredIndentation(Document document, int lineNumber, CancellationToken cancellationToken) { var result = _service.GetDesiredIndentation(document, lineNumber, cancellationToken); if (result.HasValue) { return(new IndentationResult(result.Value.BasePosition, result.Value.Offset)); } else { return(null); } }