Skip to content

Commit

Permalink
Let people change the scope of a reference, why not?
Browse files Browse the repository at this point in the history
  • Loading branch information
jbevain committed Aug 10, 2012
1 parent aea2ceb commit 245e3cb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Mono.Cecil/AssemblyReader.cs
Expand Up @@ -782,7 +782,7 @@ public Collection<TypeDefinition> ReadNestedTypes (TypeDefinition type)
var nested_type = GetTypeDefinition (mapping [i]);

if (nested_type != null)
nested_types.Add (nested_type);
nested_types.Add (nested_type);
}

metadata.RemoveNestedTypeMapping (type);
Expand Down
9 changes: 9 additions & 0 deletions Mono.Cecil/TypeReference.cs
Expand Up @@ -147,6 +147,15 @@ public class TypeReference : MemberReference, IGenericParameterProvider, IGeneri

return scope;
}
set {
var declaring_type = this.DeclaringType;
if (declaring_type != null) {
declaring_type.Scope = value;
return;
}

scope = value;
}
}

public bool IsNested {
Expand Down

0 comments on commit 245e3cb

Please sign in to comment.