MCPcopy Create free account
hub / github.com/apache/thrift / Main

Method Main

test/netstd/Server/Program.cs:29–57  ·  view source on GitHub ↗
(string[] args)

Source from the content-addressed store, hash-verified

27 public class Program
28 {
29 static async Task<int> Main(string[] args)
30 {
31 if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
32 {
33 try
34 {
35 Console.SetBufferSize(Console.BufferWidth, 4096);
36 }
37 catch (Exception)
38 {
39 Console.WriteLine("Failed to grow scroll-back buffer");
40 }
41 }
42
43 // run whatever mode is choosen, default to test impl
44 var argslist = new List<string>(args);
45 switch (argslist.FirstOrDefault())
46 {
47 case "server": // crosstest wants to pass this, so just emit a hint and ignore
48 Console.WriteLine("Hint: The 'server' argument is no longer required.");
49 argslist.RemoveAt(0);
50 return await TestServer.Execute(argslist);
51 case "--help":
52 PrintHelp();
53 return 0;
54 default:
55 return await TestServer.Execute(argslist);
56 }
57 }
58
59 private static void PrintHelp()
60 {

Callers

nothing calls this directly

Calls 1

ExecuteMethod · 0.45

Tested by

no test coverage detected