Assembly.Switches Property

[Read/Write] This property is a string value that contains all of the command line options used by the assembly. For example, your host application could examine this property to determine if any switches indicate that the interview should not be displayed.

Syntax

public string Switches { set; get; }

Example

// Check the switches in case this assembly resulted from an ASSEMBLE instruction in another template.
// In this case, it is possible that the template author indicated that no interview should be asked using a
// "/nw" or "/naw" switch. If this is the case, we skip this page and redirect to the disposition page
 
string switches = _session.CurrentAssembly.Switches.ToLower();
if(-1 != switches.IndexOf("/nw") || -1 != switches.IndexOf("/naw"))
    Response.Redirect("disposition.aspx");