void getVirtualPropName(PropertyDef propDef, ref string prefix, ref string propName) { PropertyRef sameDef; var overrideMethod = propDef.getOverrideMethod(); if (overrideMethod != null && (sameDef = defFinder.findProp(overrideMethod)) != null) { prefix = getOverrideMethodNamePrefix(sameDef.Owner.TypeDefinition); propName = sameDef.NewName; return; } var method = getOverrideMethod(propDef.PropertyDefinition.GetMethod ?? propDef.PropertyDefinition.SetMethod); if (method != null) { var realName = getRealName(method.Name); // Only use the name if the method is not in one of the loaded files, since the // name shouldn't be obfuscated. if (Regex.IsMatch(realName, @"^[sg]et_.") && defFinder.findProp(method) == null) { prefix = getOverrideMethodNamePrefix(method.DeclaringType); propName = realName.Substring(4); return; } } sameDef = MemberRenameState.get(propDef); if (sameDef != null) { prefix = ""; propName = sameDef.NewName; return; } }
public void add(PropertyDef p) { properties.add(p); }