Click or drag to resize

ToCSharpPrinterToCSharpString Method (Expression, StringBuilder, Int32, Boolean, FuncType, String, String, Int32, CodePrinterObjectToCode)

Tries hard to convert the expression into the correct C# code

Namespace:  SphinxConnector.FluentApi.Helpers
Assembly:  SphinxConnector (in SphinxConnector.dll) Version: 5.2.0
Syntax
public static StringBuilder ToCSharpString(
	this Expression e,
	StringBuilder sb,
	int lineIdent = 0,
	bool stripNamespace = false,
	Func<Type, string, string> printType = null,
	int identSpaces = 4,
	CodePrinterObjectToCode notRecognizedToCode = null
)

Parameters

e
Type: System.Linq.ExpressionsExpression

[Missing <param name="e"/> documentation for "M:SphinxConnector.FluentApi.Helpers.ToCSharpPrinter.ToCSharpString(System.Linq.Expressions.Expression,System.Text.StringBuilder,System.Int32,System.Boolean,System.Func{System.Type,System.String,System.String},System.Int32,SphinxConnector.FluentApi.Helpers.CodePrinter.ObjectToCode)"]

sb
Type: System.TextStringBuilder

[Missing <param name="sb"/> documentation for "M:SphinxConnector.FluentApi.Helpers.ToCSharpPrinter.ToCSharpString(System.Linq.Expressions.Expression,System.Text.StringBuilder,System.Int32,System.Boolean,System.Func{System.Type,System.String,System.String},System.Int32,SphinxConnector.FluentApi.Helpers.CodePrinter.ObjectToCode)"]

lineIdent (Optional)
Type: SystemInt32

[Missing <param name="lineIdent"/> documentation for "M:SphinxConnector.FluentApi.Helpers.ToCSharpPrinter.ToCSharpString(System.Linq.Expressions.Expression,System.Text.StringBuilder,System.Int32,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.ToCSharpPrinter.ToCSharpString(System.Linq.Expressions.Expression,System.Text.StringBuilder,System.Int32,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.ToCSharpPrinter.ToCSharpString(System.Linq.Expressions.Expression,System.Text.StringBuilder,System.Int32,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.ToCSharpPrinter.ToCSharpString(System.Linq.Expressions.Expression,System.Text.StringBuilder,System.Int32,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.ToCSharpPrinter.ToCSharpString(System.Linq.Expressions.Expression,System.Text.StringBuilder,System.Int32,System.Boolean,System.Func{System.Type,System.String,System.String},System.Int32,SphinxConnector.FluentApi.Helpers.CodePrinter.ObjectToCode)"]

Return Value

Type: StringBuilder

[Missing <returns> documentation for "M:SphinxConnector.FluentApi.Helpers.ToCSharpPrinter.ToCSharpString(System.Linq.Expressions.Expression,System.Text.StringBuilder,System.Int32,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