You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.0 KiB
45 lines
1.0 KiB
1 month ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Linq;
|
||
|
using System.Threading.Tasks;
|
||
|
|
||
|
using Sog;
|
||
|
|
||
|
namespace SMAgent
|
||
|
{
|
||
|
public class Program
|
||
|
{
|
||
|
public static void Main(string[] args)
|
||
|
{
|
||
|
long iNow = DateTimeOffset.Now.ToUnixTimeSeconds();
|
||
|
|
||
|
bool bServerRunMode = false;
|
||
|
|
||
|
try
|
||
|
{
|
||
|
AppParam appParam = new AppParam(args,true);
|
||
|
|
||
|
if(appParam.RunMode == AppRunMode.Start)
|
||
|
{
|
||
|
bServerRunMode = true;
|
||
|
}
|
||
|
|
||
|
SMAgentApp entry = new SMAgentApp(appParam);
|
||
|
entry.Start();
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
if(bServerRunMode)
|
||
|
{
|
||
|
TraceLog.Exception(ex,true);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
Console.WriteLine(ex.Message);
|
||
|
Console.WriteLine(ex.StackTrace);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|