~ubuntu-branches/ubuntu/lucid/monodevelop/lucid

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2010-02-02 11:39:59 UTC
  • mfrom: (1.2.6 upstream) (1.3.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100202113959-s4exdz7er7igylz2
Tags: 2.2.1+dfsg-1
* New upstream release
* debian/control:
  + Standards version 3.8.4 (no changes needed)
* debian/patches/remove_support_for_non_debian_functionality.patch,
  debian/patches/remove_support_for_soft_debugger.patch,
  debian/patches/remove_support_for_moonlight.patch,
  debian/rules:
  + Split patch into two pieces, to make it easier to enable either
    SDB or Moonlight support with a rebuild
* debian/monodevelop-moonlight.install,
  debian/monodevelop-debugger-sdb.install,
  debian/control:
  + Create packaging data for the Soft Debugger addin and Moonlight addin -
    and comment them out of debian/control as we can't provide them on
    Debian for now

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
                        set { m_callConv = value; }
56
56
                }
57
57
 
 
58
                public virtual bool HasParameters {
 
59
                        get { return (m_parameters == null) ? false : (m_parameters.Count > 0); }
 
60
                }
 
61
 
58
62
                public virtual ParameterDefinitionCollection Parameters {
59
63
                        get {
60
64
                                if (m_parameters == null)
63
67
                        }
64
68
                }
65
69
 
 
70
                public bool HasGenericParameters {
 
71
                        get { return (m_genparams == null) ? false : (m_genparams.Count > 0); }
 
72
                }
 
73
 
66
74
                public GenericParameterCollection GenericParameters {
67
75
                        get {
68
76
                                if (m_genparams == null)
99
107
                        this.ReturnType.ReturnType = returnType;
100
108
                }
101
109
 
 
110
                public virtual MethodDefinition Resolve ()
 
111
                {
 
112
                        TypeReference declaringType = DeclaringType;
 
113
                        if (declaringType == null)
 
114
                                return null;
 
115
 
 
116
                        return declaringType.Module.Resolver.Resolve (this);
 
117
                }
 
118
 
102
119
                public virtual MethodReference GetOriginalMethod ()
103
120
                {
104
121
                        return this;
106
123
 
107
124
                public int GetSentinel ()
108
125
                {
109
 
                        for (int i = 0; i < Parameters.Count; i++)
110
 
                                if (Parameters [i].ParameterType is SentinelType)
111
 
                                        return i;
112
 
 
 
126
                        if (HasParameters) {
 
127
                                for (int i = 0; i < Parameters.Count; i++)
 
128
                                        if (Parameters [i].ParameterType is SentinelType)
 
129
                                                return i;
 
130
                        }
113
131
                        return -1;
114
132
                }
115
133
 
122
140
                        sb.Append (" ");
123
141
                        sb.Append (base.ToString ());
124
142
                        sb.Append ("(");
125
 
                        for (int i = 0; i < this.Parameters.Count; i++) {
126
 
                                if (i > 0)
127
 
                                        sb.Append (",");
128
 
 
129
 
                                if (i == sentinel)
130
 
                                        sb.Append ("...,");
131
 
 
132
 
                                sb.Append (this.Parameters [i].ParameterType.FullName);
 
143
                        if (this.HasParameters) {
 
144
                                for (int i = 0; i < this.Parameters.Count; i++) {
 
145
                                        if (i > 0)
 
146
                                                sb.Append (",");
 
147
 
 
148
                                        if (i == sentinel)
 
149
                                                sb.Append ("...,");
 
150
 
 
151
                                        sb.Append (this.Parameters [i].ParameterType.FullName);
 
152
                                }
133
153
                        }
134
154
                        sb.Append (")");
135
155
                        return sb.ToString ();