Click or drag to resize

CodePrinterToEnumValueCode Method

Prints valid C# Enum literal

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

Parameters

enumType
Type: SystemType

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

x
Type: SystemObject

[Missing <param name="x"/> documentation for "M:SphinxConnector.FluentApi.Helpers.CodePrinter.ToEnumValueCode(System.Type,System.Object,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.ToEnumValueCode(System.Type,System.Object,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.ToEnumValueCode(System.Type,System.Object,System.Boolean,System.Func{System.Type,System.String,System.String})"]

Return Value

Type: String

[Missing <returns> documentation for "M:SphinxConnector.FluentApi.Helpers.CodePrinter.ToEnumValueCode(System.Type,System.Object,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 Type. 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