Click or drag to resize
GeneratorUtilsGetDiscriminatorValueAsString Method (EntityDefinition, IGenerator, Boolean, String)
Gets the discriminator value as string.

Namespace: SD.LLBLGen.Pro.GeneratorCore
Assembly: SD.LLBLGen.Pro.GeneratorCore (in SD.LLBLGen.Pro.GeneratorCore.dll) Version: 5.0.0.0 (5.0.0)
Syntax
public static string GetDiscriminatorValueAsString(
	EntityDefinition entity,
	IGenerator executingGenerator,
	bool includeTypeCast,
	string stringPattern
)

Parameters

entity
Type: SD.LLBLGen.Pro.ApplicationCore.EntityModelEntityDefinition
The entity.
executingGenerator
Type: SD.LLBLGen.Pro.ApplicationCoreIGenerator
The executing generator.
includeTypeCast
Type: SystemBoolean
if set to it will include a typecast (e.g. (bool)value).
stringPattern
Type: SystemString
The string pattern to use when a string value has to be wrapped. Use this to specify different quotes than the default double-quotes. Use {0} to specify where the string has to be placed. Example: "\"{0}\"" to get a string which is wrapped into double quotes.

Return Value

Type: String
the discriminator value, casted to the right type in string format and ready to be emitted to the output
Remarks
Supports C# and VB.NET.
See Also