Click or drag to resize

ToExpressionPrinterToExpressionString Method (Expression, ListParameterExpression, ListExpression, ListLabelTarget, Boolean, FuncType, String, String, Int32, CodePrinterObjectToCode)

Prints the expression in its constructing syntax - helpful to get the expression from the debug session and put into it the code for the test. In addition, returns the gathered expressions, parameters ad labels.

Namespace:  SphinxConnector.FluentApi.Helpers
Assembly:  SphinxConnector (in SphinxConnector.dll) Version: 5.2.0
Syntax
public static string ToExpressionString(
	this Expression expr,
	out List<ParameterExpression> paramsExprs,
	out List<Expression> uniqueExprs,
	out List<LabelTarget> lts,
	bool stripNamespace = false,
	Func<Type, string, string> printType = null,
	int identSpaces = 2,
	CodePrinterObjectToCode notRecognizedToCode = null
)

Parameters

expr
Type: System.Linq.ExpressionsExpression

[Missing <param name="expr"/> documentation for "M:SphinxConnector.FluentApi.Helpers.ToExpressionPrinter.ToExpressionString(System.Linq.Expressions.Expression,System.Collections.Generic.List{System.Linq.Expressions.ParameterExpression}@,System.Collections.Generic.List{System.Linq.Expressions.Expression}@,System.Collections.Generic.List{System.Linq.Expressions.LabelTarget}@,System.Boolean,System.Func{System.Type,System.String,System.String},System.Int32,SphinxConnector.FluentApi.Helpers.CodePrinter.ObjectToCode)"]

paramsExprs
Type: System.Collections.GenericListParameterExpression

[Missing <param name="paramsExprs"/> documentation for "M:SphinxConnector.FluentApi.Helpers.ToExpressionPrinter.ToExpressionString(System.Linq.Expressions.Expression,System.Collections.Generic.List{System.Linq.Expressions.ParameterExpression}@,System.Collections.Generic.List{System.Linq.Expressions.Expression}@,System.Collections.Generic.List{System.Linq.Expressions.LabelTarget}@,System.Boolean,System.Func{System.Type,System.String,System.String},System.Int32,SphinxConnector.FluentApi.Helpers.CodePrinter.ObjectToCode)"]

uniqueExprs
Type: System.Collections.GenericListExpression

[Missing <param name="uniqueExprs"/> documentation for "M:SphinxConnector.FluentApi.Helpers.ToExpressionPrinter.ToExpressionString(System.Linq.Expressions.Expression,System.Collections.Generic.List{System.Linq.Expressions.ParameterExpression}@,System.Collections.Generic.List{System.Linq.Expressions.Expression}@,System.Collections.Generic.List{System.Linq.Expressions.LabelTarget}@,System.Boolean,System.Func{System.Type,System.String,System.String},System.Int32,SphinxConnector.FluentApi.Helpers.CodePrinter.ObjectToCode)"]

lts
Type: System.Collections.GenericListLabelTarget

[Missing <param name="lts"/> documentation for "M:SphinxConnector.FluentApi.Helpers.ToExpressionPrinter.ToExpressionString(System.Linq.Expressions.Expression,System.Collections.Generic.List{System.Linq.Expressions.ParameterExpression}@,System.Collections.Generic.List{System.Linq.Expressions.Expression}@,System.Collections.Generic.List{System.Linq.Expressions.LabelTarget}@,System.Boolean,System.Func{System.Type,System.String,System.String},System.Int32,SphinxConnector.FluentApi.Helpers.CodePrinter.ObjectToCode)"]

stripNamespace (Optional)
Type: SystemBoolean

[Missing <param name="stripNamespace"/> documentation for "M:SphinxConnector.FluentApi.Helpers.ToExpressionPrinter.ToExpressionString(System.Linq.Expressions.Expression,System.Collections.Generic.List{System.Linq.Expressions.ParameterExpression}@,System.Collections.Generic.List{System.Linq.Expressions.Expression}@,System.Collections.Generic.List{System.Linq.Expressions.LabelTarget}@,System.Boolean,System.Func{System.Type,System.String,System.String},System.Int32,SphinxConnector.FluentApi.Helpers.CodePrinter.ObjectToCode)"]

printType (Optional)
Type: SystemFuncType, String, String

[Missing <param name="printType"/> documentation for "M:SphinxConnector.FluentApi.Helpers.ToExpressionPrinter.ToExpressionString(System.Linq.Expressions.Expression,System.Collections.Generic.List{System.Linq.Expressions.ParameterExpression}@,System.Collections.Generic.List{System.Linq.Expressions.Expression}@,System.Collections.Generic.List{System.Linq.Expressions.LabelTarget}@,System.Boolean,System.Func{System.Type,System.String,System.String},System.Int32,SphinxConnector.FluentApi.Helpers.CodePrinter.ObjectToCode)"]

identSpaces (Optional)
Type: SystemInt32

[Missing <param name="identSpaces"/> documentation for "M:SphinxConnector.FluentApi.Helpers.ToExpressionPrinter.ToExpressionString(System.Linq.Expressions.Expression,System.Collections.Generic.List{System.Linq.Expressions.ParameterExpression}@,System.Collections.Generic.List{System.Linq.Expressions.Expression}@,System.Collections.Generic.List{System.Linq.Expressions.LabelTarget}@,System.Boolean,System.Func{System.Type,System.String,System.String},System.Int32,SphinxConnector.FluentApi.Helpers.CodePrinter.ObjectToCode)"]

notRecognizedToCode (Optional)
Type: SphinxConnector.FluentApi.HelpersCodePrinterObjectToCode

[Missing <param name="notRecognizedToCode"/> documentation for "M:SphinxConnector.FluentApi.Helpers.ToExpressionPrinter.ToExpressionString(System.Linq.Expressions.Expression,System.Collections.Generic.List{System.Linq.Expressions.ParameterExpression}@,System.Collections.Generic.List{System.Linq.Expressions.Expression}@,System.Collections.Generic.List{System.Linq.Expressions.LabelTarget}@,System.Boolean,System.Func{System.Type,System.String,System.String},System.Int32,SphinxConnector.FluentApi.Helpers.CodePrinter.ObjectToCode)"]

Return Value

Type: String

[Missing <returns> documentation for "M:SphinxConnector.FluentApi.Helpers.ToExpressionPrinter.ToExpressionString(System.Linq.Expressions.Expression,System.Collections.Generic.List{System.Linq.Expressions.ParameterExpression}@,System.Collections.Generic.List{System.Linq.Expressions.Expression}@,System.Collections.Generic.List{System.Linq.Expressions.LabelTarget}@,System.Boolean,System.Func{System.Type,System.String,System.String},System.Int32,SphinxConnector.FluentApi.Helpers.CodePrinter.ObjectToCode)"]

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Expression. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also