~ubuntu-branches/ubuntu/hoary/monodevelop/hoary

« back to all changes in this revision

Viewing changes to src/Libraries/SharpAssembly/src/SharpAssembly/Metadata/Rows/CustomAttribute.cs

  • Committer: Bazaar Package Importer
  • Author(s): Brandon Hale
  • Date: 2004-10-07 11:51:11 UTC
  • Revision ID: james.westby@ubuntu.com-20041007115111-pxcqnwfxyq5mhcx5
Tags: 0.5.1-3
Use dh_netdeps in debian/rules and debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// CustomAttribute.cs
 
2
// Copyright (C) 2003 Mike Krueger
 
3
// 
 
4
// This library is free software; you can redistribute it and/or
 
5
// modify it under the terms of the GNU Lesser General Public
 
6
// License as published by the Free Software Foundation; either
 
7
// version 2.1 of the License, or (at your option) any later version.
 
8
// 
 
9
// This library is distributed in the hope that it will be useful,
 
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
// Lesser General Public License for more details.
 
13
// 
 
14
// You should have received a copy of the GNU Lesser General Public
 
15
// License along with this library; if not, write to the Free Software
 
16
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
17
 
 
18
using System;
 
19
using System.IO;
 
20
 
 
21
namespace MonoDevelop.SharpAssembly.Metadata.Rows {
 
22
        
 
23
        public class CustomAttribute : AbstractRow
 
24
        {
 
25
                public static readonly int TABLE_ID = 0x0C;
 
26
                
 
27
                uint parent; // index into any metadata table, except the CustomAttribute table itself; more precisely, a HasCustomAttribute coded index
 
28
                uint type;   // index into the Method or MemberRef table; more precisely, a CustomAttributeType coded index
 
29
                uint val;    // index into Blob heap
 
30
                
 
31
                public uint Parent {
 
32
                        get {
 
33
                                return parent;
 
34
                        }
 
35
                        set {
 
36
                                parent = value;
 
37
                        }
 
38
                }
 
39
                
 
40
                public uint Type {
 
41
                        get {
 
42
                                return type;
 
43
                        }
 
44
                        set {
 
45
                                type = value;
 
46
                        }
 
47
                }
 
48
                
 
49
                public uint Val {
 
50
                        get {
 
51
                                return val;
 
52
                        }
 
53
                        set {
 
54
                                val = value;
 
55
                        }
 
56
                }
 
57
                
 
58
                public override void LoadRow()
 
59
                {
 
60
                        parent  = ReadCodedIndex(CodedIndex.HasCustomAttribute);
 
61
                        type    = ReadCodedIndex(CodedIndex.CustomAttributeType);
 
62
                        val     = LoadBlobIndex();
 
63
                }
 
64
        }
 
65
}