-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
42 lines (40 loc) · 1.31 KB
/
Program.cs
File metadata and controls
42 lines (40 loc) · 1.31 KB
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
41
42
using System;
using VDF = Autodesk.DataManagement.Client.Framework;
namespace ImportObjectProperties
{
class Program
{
static void Main(string[] args)
{
try
{
ApplicationOptions options = ApplicationOptions.Parse(args);
Application app = new Application();
System.Net.ServicePointManager.Expect100Continue = false;
Application.PrintHeader();
app.Run(options);
//SeriLog.LogInformation("TEST SERILOG");
}
catch (Exception ex)
{
if (ex is ArgumentException)
{
Application.PrintHelp();
Console.WriteLine("Press ESC to stop");
do
{
while (!Console.KeyAvailable)
{
// Do something
}
} while (Console.ReadKey(true).Key != ConsoleKey.Escape);
}
else
{
//SeriLog.LogError(VDF.Library.ExceptionParser.GetMessage(ex));
Console.WriteLine("ERROR: {0}", VDF.Library.ExceptionParser.GetMessage(ex));
}
}
}
}
}