Click or drag to resize
GeneratorUtils Class
General purpose class which contains helper methods for lpt and tdl template engines and templates so less code has to be written inside templates / template engines.
Inheritance Hierarchy
SystemObject
  SD.LLBLGen.Pro.GeneratorCoreGeneratorUtils

Namespace:  SD.LLBLGen.Pro.GeneratorCore
Assembly:  SD.LLBLGen.Pro.GeneratorCore (in SD.LLBLGen.Pro.GeneratorCore.dll) Version: 5.3.0.0 (5.3.0)
Syntax
public static class GeneratorUtils

The GeneratorUtils type exposes the following members.

Methods
  NameDescription
Public methodStatic memberBooleanToKeyword
Converts the value specified to the boolean keyword which represents the value in the current target language, so if value is true, 'true' will be returned for C# and 'True' for VB.NET
Public methodStatic memberCamelCaseString
Camel-cases the string specified, which comes down to lower-casing the first character.
Public methodStatic memberCheckIfCurrentSPCallHasInputParameters
Checks if current proc has input parameters.
Public methodStatic memberCheckIfCurrentSPCallHasOutputParameters
Checks if the current proc has output parameters.
Public methodStatic memberDetermineFullFieldNameForFieldSource
Determines the full field name for the entity field source specified. Takes into account field inlining for valuetypes.
Public methodStatic memberGetAllEntityMappingsInScope(IGenerator)
Gets all entity mappings of the entities currently in the scope of the generator, for the database currently targeted
Public methodStatic memberGetAllEntityMappingsInScope(IGenerator, String)
Gets all entity mappings of the entities currently in the scope of the generator, for the database with the id specified
Public methodStatic memberGetAllFieldMappingsToTraverseForEntity
Gets all field mappings to traverse for entity. This method will return the fieldmappings of 'mapping' unless the entity of the mapping is in a TPEH hierarchy. In that situation it will return all field mappings of all supertypes as well
Public methodStatic memberGetAllMappedTargetsInScope(IGenerator)
Gets all mapped targets from the project which are in scope of the passed in executing generator.
Public methodStatic memberGetAllMappedTargetsInScope(IGenerator, String)
Gets all mapped targets from the project which are in scope of the passed in executing generator.
Public methodStatic memberGetAllRelationshipInfosForEntity
Gets all relationship infos for the entity specified. The returned list can be used to traverse all relationships for the entity more easily
Public methodStatic memberGetAllRelationshipsInScope
Gets all relationships in scope of the executing generator
Public methodStatic memberGetAllSPCallMappingsInScope(IGenerator)
Gets all spcall mappings of the spcalls currently in the scope of the generator, for the database currently targeted.
Public methodStatic memberGetAllSPCallMappingsInScope(IGenerator, String)
Gets all spcall mappings of the spcalls currently in the scope of the generator, for the database with the id specified
Public methodStatic memberGetAllSPResultsetMappingInfos(IGenerator)
Gets all Stored procedure resultset mapping info objects. For each stored procedure which has a resultset as target of a mapping (typedviews) it produces a StoredProcResultsetMappingInfo, which can be used to generate call information for the stored procedure to fill the types mapped onto its resultsets.
Public methodStatic memberGetAllSPResultsetMappingInfos(IGenerator, String)
Gets all Stored procedure resultset mapping info objects. For each stored procedure which has a resultset as target of a mapping (typedviews) it produces a StoredProcResultsetMappingInfo, which can be used to generate call information for the stored procedure to fill the types mapped onto its resultsets.
Public methodStatic memberGetAllTvfCallMappingsInScope(IGenerator)
Gets all tvf call mappings of the tvf calls currently in the scope of the generator, for the database currently targeted
Public methodStatic memberGetAllTvfCallMappingsInScope(IGenerator, String)
Gets all tvf call mappings of the tvfcalls currently in the scope of the generator, for the database with the id specified
Public methodStatic memberGetAllTypedViewMappingsInScope(IGenerator)
Gets all typed view mappings of the typedviews currently in the scope of the generator, for the database currently targeted
Public methodStatic memberGetAllTypedViewMappingsInScope(IGenerator, String)
Gets all typed view mappings of the typedviews currently in the scope of the generator, for the database with the id specified
Public methodStatic memberGetCustomPropertyName
Gets the name of the custom property, processed. Name is the key of the pair specified.
Public methodStatic memberGetCustomPropertyValue
Gets the custom property value, which is the value of the customProperty pair specified, processed.
Public methodStatic memberGetDiscriminatorField
Gets the discriminator field for the current entity or null if not applicable/found
Public methodStatic memberGetDiscriminatorFieldMapping(EntityDefinition, IGenerator)
Gets the discriminator field mapping for the discriminator field of the sub hierarchy the passed in entity is in. Null if not applicable/found
Public methodStatic memberGetDiscriminatorFieldMapping(EntityDefinition, IGenerator, String)
Gets the discriminator field mapping for the discriminator field of the sub hierarchy the passed in entity is in. Null if not applicable/found
Public methodStatic memberGetDiscriminatorValueAsString(EntityDefinition, IGenerator)
Gets the discriminator value as string.
Public methodStatic memberGetDiscriminatorValueAsString(EntityDefinition, IGenerator, Boolean)
Gets the discriminator value as string.
Public methodStatic memberGetDiscriminatorValueAsString(EntityDefinition, IGenerator, Boolean, String)
Gets the discriminator value as string.
Public methodStatic memberGetDotNetTypeAsString(Type, IGenerator)
Returns the string to emit for the .net type specified
Public methodStatic memberGetDotNetTypeAsString(Type, IGenerator, String, Boolean)
Returns the string to emit for the .net type specified
Public methodStatic memberGetInheritedTypesAsStringCSharp
returns all inherited types (base class from settings, additional interfaces from settings) as a comma separated string doesn't look at supertypes for inheritance scenario's. Filters out empty names. Usable for C#
Public methodStatic memberGetInheritedTypesAsStringVBNet
returns all inherited types (base class from settings, additional interfaces from settings) as a comma separated string doesn't look at supertypes for inheritance scenario's. Filters out empty names. Usable for VB.NET as it properly formats the code using Inherits and Implements.
Public methodStatic memberGetLinqChunkInfosForTypedList
Gets the linq chunk infos for the typed list specified. This list of chunks is then usable to produce Linq queries (one intermediate query per chunk info)
Public methodStatic memberGetRealMaxLength
Gets the real length for the type specified, if the specified length is 0. This only affects string and array types, all other types are ignored
Public methodStatic memberGetRelationshipsToWalk
Gets the relationships to walk. This routine returns, ordered on the related entity name, ascending, a list of keyvaluepairs which has as Key a Pair (Value1: relationship to walk, Value2, flag whether the relationship is used via the startentity) and as Value the related entity via the Key.value1 relationship. All relationships with entities not in the list of entities specified in the specified executingGenerator are ignored.
Public methodStatic memberGetRelationshipsWithRelatedEntity
Gets the relationship data with the related entity based on the input specified.
Public methodStatic memberGetSequenceName
Gets the name of the sequence as defined on the field mapping specified, or an empty string if no sequence is present.
Public methodStatic memberGetSPCallForElementTarget
Gets the SPCallDefinition for the target the element is mapped on for the executinggenerator's scope. This method is only returning a value if element is mapped onto a storedproc resultset. In that case, the SPCall is returned, otherwise null.
Public methodStatic memberGetStoredProcedureParameterMappingsToWalk
Gets the stored procedure parameter mappings to walk.
Public methodStatic memberGetStoredProcedureParametersToWalk
Gets the stored procedure parameters to walk.
Public methodStatic memberGetTypeConverterTypeName
Gets the name of the type converter type, or empty string if not found/not specified.
Public methodStatic memberGetUnmappedTargetFields
Returns the unmapped fields in the mapping for the database with the driverID specified for the entity specified. If entity is part of a TPEH hierarchy, it will return all unmapped fields which are not mapped in any of the entities in the hierarchy. If entity is part of a split-off scenario, an unmapped field is only returned for the root of the split-off scenario (the PK side entity); if entity is the split-off entity, the field isn't returned as unmapped.
Public methodStatic memberPluralizeString
Pluralizes the string specified using the assigned plugin.
Public methodStatic memberProcessCodeGenerationOptionMacros
Processes the code generation option macros in the string passed in and returns the new string.
Public methodStatic memberProduceDotNetTypeName(Type, Boolean, String)
Produces a .NET type name for the type specified. If generateAsNullableType is set to true the pattern is used to produce the type string, otherwise the type name is produced using ToString()
Public methodStatic memberProduceDotNetTypeName(IFieldElementCore, Project, String)
Produces a .NET type name for the field specified. If the field is nullable and nullable types should be generated according to the settings in the specified field, the pattern is used to produce the type string, otherwise the type name is produced using ToString()
Public methodStatic memberSingularizeString
Singularizes the string specified using the assigned plugin
Public methodStatic memberStripFromCLRFs
Strips the specified string from CRLFs and optionally converts the string's double quotes and limits the string's length to 2000 chars
Top
See Also