~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/mono-tools/gendarme/rules/Gendarme.Rules.Maintainability/AvoidDeepInheritanceTreeRule.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
85
85
                                return RuleResult.DoesNotApply;
86
86
 
87
87
                        int depth = 0;
88
 
                        while (type.BaseType != null) {
89
 
                                type = type.BaseType.Resolve ();
90
 
                                if (type == null)
 
88
                        TypeDefinition temp = type;
 
89
                        while (temp.BaseType != null) {
 
90
                                temp = temp.BaseType.Resolve();
 
91
                                if (temp == null)
91
92
                                        break;
92
 
                                if (countExternalDepth || Runner.Assemblies.Contains (type.Module.Assembly))
 
93
                                if (countExternalDepth || Runner.Assemblies.Contains(temp.Module.Assembly))
93
94
                                        depth++;
94
95
                        }
95
96