I want to pass command line parameters to a custom directive processor.
I expected to see the parameters in the arguments parameter on the ProcessDirective method of my custom directive processor.
Can anyone provide an example of this?
You have to do next steps:
protected
{
providesDictionary[
}
Now you can run command line: -a "!!BaseSourceDir!c:\\Projects\\SSO\\Implementation" or in template
<#@ InstallerDefinition processor="InstallerDefinitionDirectiveProcessor" requires="fileName='..\CustomPTCustomizationInstaller.pkgsetup'" provides="installerPackageModel=InstallerDefinition;BaseSourceDir=c:\\projects\\sso\\"#>
Also, I add this code to have all parameters as property of the TextTransformationTemplate:
System.CodeDom.
property.Name = argName;
property.Type =
property.Attributes = System.CodeDom.
property.HasSet =
property.HasGet =
property.GetStatements.Add(
properties.Add(property);
options1.BlankLinesBetweenMembers =
options1.IndentString =
options1.VerbatimOrder =
options1.BracingStyle =
languageProvider.GenerateCodeFromMember(p, writer1, options1);