-
Notifications
You must be signed in to change notification settings - Fork 2
/
Program.cs
48 lines (41 loc) · 1.07 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
41
42
43
44
45
46
47
48
using System;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Text;
namespace UsageRateTool
{
class Program
{
static int CountReference(byte[] needle, byte[] haystack)
{
int result = 0;
return result;
}
static void Main(string[] args)
{
var option = new OptionParser(args);
if (option.Sources.Count() == 0)
{
option.Help();
return;
}
var map = new APIMap(option.Sources);
if (option.Targets.Count() == 0)
{
MarkdownTemplate.Print(map.APIList);
return;
}
ILFinder.Find(option.Targets, (caller, callee) =>
{
if (map.NameMap.TryGetValue(callee, out var value))
{
value.Caller.Add(caller);
}
});
MarkdownTemplate.Print(map.APIList);
}
}
}