blob: 4b3acb557f59cd0ee7d61d68661e6b9ad8236715 (
plain)
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
|
//
// Mono.ILASM.FieldRef
//
// Author(s):
// Jackson Harper (Jackson@LatitudeGeo.com)
//
// (C) 2003 Jackson Harper, All rights reserved
//
using System;
namespace Mono.ILASM {
public class FieldRef : IFieldRef {
private TypeRef owner;
private BaseTypeRef ret_type;
private string name;
private bool is_resolved;
private PEAPI.Field peapi_field;
public FieldRef (TypeRef owner, BaseTypeRef ret_type, string name)
{
this.owner = owner;
this.ret_type = ret_type;
this.name = name;
is_resolved = false;
}
public PEAPI.Field PeapiField {
get { return peapi_field; }
}
public void Resolve (CodeGen code_gen)
{
if (is_resolved)
return;
TypeDef owner_def = code_gen.TypeManager[owner.FullName];
peapi_field = owner_def.ResolveField (name, ret_type, code_gen);
is_resolved = true;
}
}
}
|