Add createEventDefinition() method
This commit is contained in:
parent
0c36e74834
commit
76420f4736
|
@ -842,5 +842,10 @@ namespace de4dot.blocks {
|
||||||
propDef.MetadataToken = new MetadataToken(TokenType.Property, nextTokenRid--);
|
propDef.MetadataToken = new MetadataToken(TokenType.Property, nextTokenRid--);
|
||||||
return propDef;
|
return propDef;
|
||||||
}
|
}
|
||||||
|
public static EventDefinition createEventDefinition(string name, TypeReference eventType) {
|
||||||
|
var eventDef = new EventDefinition(name, EventAttributes.None, eventType);
|
||||||
|
eventDef.MetadataToken = new MetadataToken(TokenType.Event, nextTokenRid--);
|
||||||
|
return eventDef;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user