forked from dotnet/orleans
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
40 lines (35 loc) · 1.02 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
using System.Reflection;
using Microsoft.Extensions.Logging;
using Orleans.Runtime;
namespace Orleans.Counter.Control
{
class Program
{
static int Main(string[] args)
{
var prog = new CounterControl(CounterControl.InitDefaultLogging());
// Program ident
AssemblyName thisProgram = typeof(Program).GetTypeInfo().Assembly.GetName();
var progTitle = string.Format("{0} v{1}", thisProgram.Name, thisProgram.Version.ToString());
ConsoleText.WriteStatus(progTitle);
Console.Title = progTitle;
int result;
if (!prog.ParseArguments(args))
{
prog.PrintUsage();
result = -1;
}
else
{
result = prog.Run();
}
if (prog.PauseAtEnd)
{
Console.WriteLine("Press any key to exit");
Console.ReadKey();
}
return result;
}
}
}