~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric

« back to all changes in this revision

Viewing changes to contrib/Mono.Cecil/Mono.Cecil/Mono.Cecil/PropertyReference.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2011-06-27 17:03:13 UTC
  • mto: (1.8.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 54.
  • Revision ID: james.westby@ubuntu.com-20110627170313-6cvz3s19x6e9hqe9
ImportĀ upstreamĀ versionĀ 2.5.92+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
// Author:
5
5
//   Jb Evain (jbevain@gmail.com)
6
6
//
7
 
// (C) 2005 Jb Evain
 
7
// Copyright (c) 2008 - 2010 Jb Evain
8
8
//
9
9
// Permission is hereby granted, free of charge, to any person obtaining
10
10
// a copy of this software and associated documentation files (the
26
26
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27
27
//
28
28
 
 
29
using System;
 
30
 
 
31
using Mono.Collections.Generic;
 
32
 
29
33
namespace Mono.Cecil {
30
34
 
31
35
        public abstract class PropertyReference : MemberReference {
32
36
 
33
 
                TypeReference m_propertyType;
34
 
                protected ParameterDefinitionCollection m_parameters;
 
37
                TypeReference property_type;
35
38
 
36
39
                public TypeReference PropertyType {
37
 
                        get { return m_propertyType; }
38
 
                        set { m_propertyType = value; }
39
 
                }
40
 
 
41
 
                public abstract bool HasParameters {
42
 
                        get;
43
 
                }
44
 
 
45
 
                public abstract ParameterDefinitionCollection Parameters {
46
 
                        get;
47
 
                }
48
 
 
49
 
                public PropertyReference (string name, TypeReference propertyType) : base (name)
 
40
                        get { return property_type; }
 
41
                        set { property_type = value; }
 
42
                }
 
43
 
 
44
                public abstract Collection<ParameterDefinition> Parameters {
 
45
                        get;
 
46
                }
 
47
 
 
48
                internal PropertyReference (string name, TypeReference propertyType)
 
49
                        : base (name)
50
50
                {
51
 
                        m_propertyType = propertyType;
 
51
                        if (propertyType == null)
 
52
                                throw new ArgumentNullException ("propertyType");
 
53
 
 
54
                        property_type = propertyType;
52
55
                }
53
 
 
54
 
                public abstract PropertyDefinition Resolve ();
55
56
        }
56
57
}