Files
codeql/csharp/ql/test/utils/modelgenerator/dataflow/Sources.cs
2024-05-17 09:44:58 +02:00

38 lines
1.1 KiB
C#

using System;
namespace Sources;
public class NewSources
{
// New source
// source=Sources;NewSources;false;WrapConsoleReadLine;();;ReturnValue;local;df-generated
// neutral=Sources;NewSources;WrapConsoleReadLine;();summary;df-generated
public string? WrapConsoleReadLine()
{
return Console.ReadLine();
}
// New source
// source=Sources;NewSources;false;WrapConsoleReadLineAndProcees;(System.String);;ReturnValue;local;df-generated
// neutral=Sources;NewSources;WrapConsoleReadLineAndProcees;(System.String);summary;df-generated
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
// source=Sources;NewSources;false;WrapConsoleReadKey;();;ReturnValue;local;df-generated
// neutral=Sources;NewSources;WrapConsoleReadKey;();summary;df-generated
public ConsoleKeyInfo WrapConsoleReadKey()
{
return Console.ReadKey();
}
}