Hi,
I have a T4 template and need to add interfaces to a class depending on the parameters that have been set.
<#@ parameter name="ClassName" type="System.String" #>
<#@ parameter name="IncludeSave" type="System.Boolean" #>
<#@ parameter name="IncludeDelete" type="System.Boolean" #>
<#@ parameter name="IncludeRetrieve" type="System.Boolean" #>
public class <#= this.ClassName #> : IRetrieveOperation, ISaveOperation, IDeleteOperation
I would like to only add the IRetrieveOperation interface if IncludeRetrieve is set to true, and similarly for ISaveOperation and IDeleteOperation.
Does anyone know how this would be achieved?
Thanks heaps.