Empire uses Covenant's yamls to import modules and run them through the Roslyn compiler. C# tasks are broken into two parts for Covenant and Empire. Everything external to section Empire uses the formatting defined by Covenant's task, which additional documentation can be found here.
C# modules have a section called Empire in the yamls that defines Empire specific setting. These options are internal to Empire and will not be sent to the compiler. The Empire section of the yaml uses a similar formatting scheme as Python and PowerShell modules and an example of Empire yaml is below. This setup is used in the ProcessInjection module.
- name: ''
custom_generate: For complex modules that require custom code that accesses Empire logic, such as lateral movement modules dynamically generating a listener launcher, a custom "generate" function can be used. To tell Empire to utilize the custom generate function, set