Click or drag to resize

CodePrinterToCode Method (Object, CodePrinterObjectToCode, Boolean, FuncType, String, String)

Prints a valid C# for known x, otherwise uses passed notRecognizedToCode or falls back to `ToString()`.

Namespace:  SphinxConnector.FluentApi.Helpers
Assembly:  SphinxConnector (in SphinxConnector.dll) Version: 5.2.0
Syntax
public static string ToCode(
	this Object x,
	CodePrinterObjectToCode notRecognizedToCode,
	bool stripNamespace = false,
	Func<Type, string, string> printType = null
)

Parameters

x
Type: SystemObject

[Missing <param name="x"/> documentation for "M:SphinxConnector.FluentApi.Helpers.CodePrinter.ToCode(System.Object,SphinxConnector.FluentApi.Helpers.CodePrinter.ObjectToCode,System.Boolean,System.Func{System.Type,System.String,System.String})"]

notRecognizedToCode
Type: SphinxConnector.FluentApi.HelpersCodePrinterObjectToCode

[Missing <param name="notRecognizedToCode"/> documentation for "M:SphinxConnector.FluentApi.Helpers.CodePrinter.ToCode(System.Object,SphinxConnector.FluentApi.Helpers.CodePrinter.ObjectToCode,System.Boolean,System.Func{System.Type,System.String,System.String})"]

stripNamespace (Optional)
Type: SystemBoolean

[Missing <param name="stripNamespace"/> documentation for "M:SphinxConnector.FluentApi.Helpers.CodePrinter.ToCode(System.Object,SphinxConnector.FluentApi.Helpers.CodePrinter.ObjectToCode,System.Boolean,System.Func{System.Type,System.String,System.String})"]

printType (Optional)
Type: SystemFuncType, String, String

[Missing <param name="printType"/> documentation for "M:SphinxConnector.FluentApi.Helpers.CodePrinter.ToCode(System.Object,SphinxConnector.FluentApi.Helpers.CodePrinter.ObjectToCode,System.Boolean,System.Func{System.Type,System.String,System.String})"]

Return Value

Type: String

[Missing <returns> documentation for "M:SphinxConnector.FluentApi.Helpers.CodePrinter.ToCode(System.Object,SphinxConnector.FluentApi.Helpers.CodePrinter.ObjectToCode,System.Boolean,System.Func{System.Type,System.String,System.String})"]

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Object. 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