~ubuntu-branches/ubuntu/feisty/monodevelop/feisty

« back to all changes in this revision

Viewing changes to Core/src/MonoDevelop.Projects/MonoDevelop.Projects.Parser/ReflectionClass.cs

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2006-08-18 00:51:23 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060818005123-5iit07y0j7wjg55f
Tags: 0.11+svn20060818-0ubuntu1
* New SVN snapshot
  + Works with Gtk# 2.9.0
* debian/control:
  + Updated Build-Depends
* debian/patches/use_nunit2.2.dpatch,
  debian/patches/use_real_libs.dpatch:
  + Updated
* debian/patches/versioncontrol_buildfix.dpatch:
  + Fix build failure in the version control addin

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
using System.Xml;
13
13
using System.Collections.Specialized;
14
14
using Mono.Cecil;
 
15
using MDGenericParameter = MonoDevelop.Projects.Parser.GenericParameter;
15
16
 
16
17
namespace MonoDevelop.Projects.Parser
17
18
{
86
87
                        
87
88
                        modifiers |= GetModifiers (type.Attributes);
88
89
                        
 
90
                        // Add generic parameters to the type
 
91
                        if (type.GenericParameters != null && type.GenericParameters.Count > 0) {
 
92
                                this.GenericParameters = new GenericParameterList();
 
93
                                
 
94
                                foreach (Mono.Cecil.GenericParameter par in type.GenericParameters) {
 
95
                                        // Fill out the type constraints for generic parameters 
 
96
                                        ReturnTypeList rtl = null;
 
97
                                        if (par.Constraints != null && par.Constraints.Count > 0) {
 
98
                                                rtl = new ReturnTypeList();
 
99
                                                foreach (Mono.Cecil.TypeReference typeRef in par.Constraints) {
 
100
                                                        rtl.Add(new ReflectionReturnType(typeRef));
 
101
                                                }
 
102
                                        }
 
103
                                        
 
104
                                        // Add the parameter to the generic parameter list
 
105
                                        this.GenericParameters.Add(new MDGenericParameter(par.Name, rtl, (System.Reflection.GenericParameterAttributes)par.Attributes));
 
106
                                }
 
107
                        }
 
108
                        
89
109
                        // set base classes
90
110
                        if (type.BaseType != null) { // it's null for System.Object ONLY !!!
91
 
                                baseTypes.Add(type.BaseType.FullName);
 
111
                                baseTypes.Add(new ReflectionReturnType(type.BaseType));
92
112
                        }
93
113
                        
94
114
                        if (classType != ClassType.Delegate) {
95
115
                                // add members
96
116
                                foreach (TypeReference iface in type.Interfaces) {
97
 
                                        baseTypes.Add(iface.FullName);
 
117
                                        baseTypes.Add(new ReflectionReturnType(iface));
98
118
                                }
99
119
                                
100
120
                                foreach (TypeDefinition nestedType in type.NestedTypes) {