Parameters can be passed to alter transformations by:
- using
AddTransformerParameter
in session Query - using
SetTransformerParameters
in session DocumentQuery - filling
TransformerParameters
inIndexQuery
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 /}