forked from saeidmh83/AssemblyVisualizer
/
Converter.cs
62 lines (52 loc) · 1.4 KB
/
Converter.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Copyright 2011 Denis Markelov
// This code is distributed under Microsoft Public License
// (for details please see \docs\Ms-PL)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AssemblyVisualizer.Model;
namespace AssemblyVisualizer.HAL
{
class Converter
{
private static IConverter _converter;
static Converter()
{
#if ILSpy
_converter = new ILSpy.Converter();
#endif
#if Reflector
_converter = new Reflector.Converter();
#endif
}
public static AssemblyInfo Assembly(object assembly)
{
return _converter.Assembly(assembly);
}
public static TypeInfo Type(object type)
{
return _converter.Type(type);
}
public static MethodInfo Method(object method)
{
return _converter.Method(method);
}
public static FieldInfo Field(object field)
{
return _converter.Field(field);
}
public static PropertyInfo Property(object property)
{
return _converter.Property(property);
}
public static EventInfo Event(object ev)
{
return _converter.Event(ev);
}
public static void ClearCache()
{
_converter.ClearCache();
}
}
}