* Mono.Posix.dll.sources: Rename Mono.Posix to Mono.Unix.
[mono.git] / mcs / ilasm / codegen / CustomAttr.cs
1 //
2 // Mono.ILASM.CustomAttr
3 //
4 // Author(s):
5 //  Jackson Harper (Jackson@LatitudeGeo.com)
6 //
7 // (C) 2003 Jackson Harper, All rights reserved
8 //
9
10
11 using System;
12
13
14 namespace Mono.ILASM {
15
16         public class CustomAttr {
17
18                 private IMethodRef method_ref;
19                 private byte[] data;
20
21                 public CustomAttr (IMethodRef method_ref, byte[] data)
22                 {
23                         this.method_ref = method_ref;
24                         this.data = data;
25                 }
26
27                 public void AddTo (CodeGen code_gen, PEAPI.MetaDataElement elem)
28                 {
29                         method_ref.Resolve (code_gen);
30                         code_gen.PEFile.AddCustomAttribute (method_ref.PeapiMethod, data, elem);
31                 }
32
33         }
34
35 }
36