Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 1.33 KB

passing-parameters.markdown

File metadata and controls

23 lines (16 loc) · 1.33 KB

Passing parameters

Parameters can be passed to alter transformations by:

  • using AddTransformerParameter in session Query
  • using SetTransformerParameters in session DocumentQuery
  • filling TransformerParameters in IndexQuery that can be used in commands Query
  • passing parameters directly in various Get methods from commands

To access passed parameters from within a transformer, use one of the two available methods: Parameter or ParameterOrDefault. The difference between those two methods is that Parameter will throw if the parameter is not supplied, and ParameterOrDefault will use the default value.

{CODE transformers_1@Transformers/Parameters.cs /}

{CODE transformers_2@Transformers/Parameters.cs /}

Related articles