Add createPropertyDefinition()

This commit is contained in:
de4dot 2011-11-21 10:32:57 +01:00
parent d014835c7c
commit 121bb35633

View File

@ -835,5 +835,12 @@ namespace de4dot.blocks {
}
return null;
}
static int nextTokenRid = 0x00FFFFFF;
public static PropertyDefinition createPropertyDefinition(string name, TypeReference propType) {
var propDef = new PropertyDefinition(name, PropertyAttributes.None, propType);
propDef.MetadataToken = new MetadataToken(TokenType.Property, nextTokenRid--);
return propDef;
}
}
}