public MatchParents ( IMemberRefParent parent1, IMemberRefParent parent2 ) : bool | ||
parent1 | IMemberRefParent | The first member parent to compare. |
parent2 | IMemberRefParent | The second member parent to compare. |
리턴 | bool |
public bool MatchParents(IMemberRefParent parent1, IMemberRefParent parent2)
{
if (parent1 == null && parent2 == null)
return true;
if (parent1 == null || parent2 == null)
return false;
var type = parent1 as ITypeDefOrRef;
if (type != null)
return MatchTypes(type, parent2 as ITypeDefOrRef);
var moduleRef = parent1 as ModuleReference;
if (moduleRef != null)
return MatchModules(moduleRef, parent2 as ModuleReference);
return false;
}