mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
C#: Add test case for CaptureSummaryModels query.
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
| Sources;NewSources;false;WrapConsoleReadKey;();ReturnValue;local |
|
||||
| Sources;NewSources;false;WrapConsoleReadLine;();ReturnValue;local |
|
||||
| Sources;NewSources;false;WrapConsoleReadLineAndProcees;(System.String);ReturnValue;local |
|
||||
@@ -0,0 +1 @@
|
||||
utils/model-generator/CaptureSourceModels.ql
|
||||
31
csharp/ql/test/utils/model-generator/Sources.cs
Normal file
31
csharp/ql/test/utils/model-generator/Sources.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
|
||||
namespace Sources;
|
||||
|
||||
public class NewSources
|
||||
{
|
||||
// New source
|
||||
public string? WrapConsoleReadLine()
|
||||
{
|
||||
return Console.ReadLine();
|
||||
}
|
||||
|
||||
// New source
|
||||
public string WrapConsoleReadLineAndProcees(string prompt)
|
||||
{
|
||||
var s = Console.ReadLine();
|
||||
return string.IsNullOrEmpty(s) ? "" : s.ToUpper();
|
||||
}
|
||||
|
||||
// NOT new source as method is private
|
||||
private string? PrivateWrapConsoleReadLine()
|
||||
{
|
||||
return Console.ReadLine();
|
||||
}
|
||||
|
||||
// New source
|
||||
public ConsoleKeyInfo WrapConsoleReadKey()
|
||||
{
|
||||
return Console.ReadKey();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user