-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
36 lines (33 loc) · 931 Bytes
/
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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
namespace DecodeSample
{
using System;
/// <summary>
/// Simple decoding of a perf.data file.
/// </summary>
internal static class Program
{
public static int Main(string[] args)
{
try
{
using (var dataToWriter = new DataToWriter(Console.Out, true))
{
foreach (var arg in args)
{
Console.Out.WriteLine($"******* OpenFile: {arg}");
dataToWriter.WritePerfData(arg);
}
}
return 0;
}
catch (Exception ex)
{
Console.Error.WriteLine();
Console.Error.WriteLine(ex.Message);
return 1;
}
}
}
}