Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit eb8f07c

Browse files
committed
Make some parameters optional in ParserService.ResolveSnippet().
1 parent 9ddae1a commit eb8f07c

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ public static Value Evaluate(string code, bool allowMethodInvoke = true, bool al
585585
throw new GetValueException("no stackframe available!");
586586
var location = CurrentStackFrame.NextStatement;
587587
var fileName = new FileName(location.Filename);
588-
var rr = SD.ParserService.ResolveSnippet(fileName, new TextLocation(location.StartLine, location.StartColumn), new ParseableFileContentFinder().Create(fileName), code, null, System.Threading.CancellationToken.None);
588+
var rr = SD.ParserService.ResolveSnippet(fileName, new TextLocation(location.StartLine, location.StartColumn), code);
589589
return new ExpressionEvaluationVisitor(CurrentStackFrame, EvalThread, CurrentStackFrame.AppDomain.Compilation, allowMethodInvoke, allowSetValue).Convert(rr);
590590
}
591591

src/Main/Base/Project/Parser/IParserService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,9 @@ ResolveResult Resolve(FileName fileName, TextLocation location,
242242
ITextSource fileContent = null, ICompilation compilation = null,
243243
CancellationToken cancellationToken = default(CancellationToken));
244244

245-
ResolveResult ResolveSnippet(FileName fileName, TextLocation fileLocation,
246-
ITextSource fileContent, string codeSnippet, ICompilation compilation,
247-
CancellationToken cancellationToken);
245+
ResolveResult ResolveSnippet(FileName fileName, TextLocation fileLocation, string codeSnippet,
246+
ITextSource fileContent = null, ICompilation compilation = null,
247+
CancellationToken cancellationToken = default(CancellationToken));
248248

249249
Task<ResolveResult> ResolveAsync(FileName fileName, TextLocation location,
250250
ITextSource fileContent = null, ICompilation compilation = null,

src/Main/SharpDevelop/Parser/ParserService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ public ResolveResult Resolve(FileName fileName, TextLocation location, ITextSour
315315
return context;
316316
}
317317

318-
public ResolveResult ResolveSnippet(FileName fileName, TextLocation fileLocation, ITextSource fileContent, string codeSnippet, ICompilation compilation, CancellationToken cancellationToken)
318+
public ResolveResult ResolveSnippet(FileName fileName, TextLocation fileLocation, string codeSnippet, ITextSource fileContent, ICompilation compilation, CancellationToken cancellationToken)
319319
{
320320
var entry = GetFileEntry(fileName, true);
321321
if (entry.parser == null)

0 commit comments

Comments
 (0)