The SqlCodeTemplate type exposes the following members.

Constructors

  NameDescription
Public methodSqlCodeTemplate
Initializes a new instance of the SqlCodeTemplate class

Methods

  NameDescription
Protected methodControlAdded (Inherited from Control.)
Protected methodControlRemoved (Inherited from Control.)
Public methodCopyPropertiesTo(CodeTemplate)
Copies any matching properties to another CodeTemplate instance.
(Inherited from CodeTemplate.)
Public methodCopyPropertiesTo(CodeTemplate, Boolean)
Copies any matching properties to another CodeTemplate instance.
(Inherited from CodeTemplate.)
Public methodCopyPropertiesTo(CodeTemplate, ICollection<(Of <<'(String>)>>))
Copies any matching properties to another CodeTemplate instance.
(Inherited from CodeTemplate.)
Public methodCopyPropertiesTo(CodeTemplate, Boolean, ICollection<(Of <<'(String>)>>))
Copies any matching properties to another CodeTemplate instance.
(Inherited from CodeTemplate.)
Public methodCreate<(Of <<'(T>)>>)()()()()
Gets an instance of the specified template type. Should be used with the Register directive.
(Inherited from CodeTemplate.)
Public methodCreate<(Of <<'(T>)>>)(Boolean)
Gets an instance of the specified template type. Should be used with the Register directive.
(Inherited from CodeTemplate.)
Protected methodCreateChildControls (Inherited from Control.)
Protected methodCreateControlCollection (Inherited from Control.)
Public methodDispose()()()() (Inherited from CodeTemplate.)
Protected methodDispose(Boolean) (Inherited from CodeTemplate.)
Protected methodEnsureChildControls (Inherited from Control.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize (Inherited from CodeTemplate.)
Public methodGetCamelCaseName
Returns a camel cased name from the given identifier.
Public methodGetCodeTemplateInstance(String)
Gets an instance of the specified template.
(Inherited from CodeTemplate.)
Public methodGetCodeTemplateInstance(String, Boolean)
Gets an instance of the specified template.
(Inherited from CodeTemplate.)
Public methodGetCodeTemplateInstance(String, Boolean, Boolean)
Gets an instance of the specified template.
(Inherited from CodeTemplate.)
Public methodGetCSharpVariableType(DbType)
Returns the C# variable type based on the given dataType.
Public methodGetCSharpVariableType(ColumnSchema)
Returns the C# variable type based on the given column.
Public methodGetCSharpVariableType(CommandResultColumnSchema)
Returns the C# variable type based on the given column.
Public methodGetCSharpVariableType(ParameterSchema)
Returns the C# variable type based on the given parameter.
Public methodGetCSharpVariableType(ViewColumnSchema)
Returns the C# variable type based on the given column.
Public methodGetCustomValidationErrors
Allows the developer to add custom ValidationErrors to the validation collection.
(Inherited from CodeTemplate.)
Protected methodStatic memberGetDelimitedIdentifier(DataObjectBase)
This will look up and see if a column name should be escaped with delimited identifiers '[]'. http://msdn.microsoft.com/en-us/library/aa224033(SQL.80).aspx
Protected methodStatic memberGetDelimitedIdentifier(String, Boolean)
This will look up and see if a column name should be escaped with delimited identifiers '[]'. http://msdn.microsoft.com/en-us/library/aa224033(SQL.80).aspx
Public methodGetFileName
Gets a default name for the template output. This can be overridden in your template to provide a suitable name for the output of the template based on the property values.
(Inherited from CodeTemplate.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetMemberVariableDeclarationStatement(ColumnSchema)
Returns a C# member variable declaration statement.
Public methodGetMemberVariableDeclarationStatement(ViewColumnSchema)
Returns a C# member variable declaration statement.
Public methodGetMemberVariableDeclarationStatement(String, ColumnSchema)
Returns a C# member variable declaration statement.
Protected methodGetMemberVariableDeclarationStatement(String, DataObjectBase)
Returns a C# member variable declaration statement.
Public methodGetMemberVariableDeclarationStatement(String, ViewColumnSchema)
Returns a C# member variable declaration statement.
Public methodGetMemberVariableDefaultValue(ColumnSchema)
Protected methodStatic memberGetMemberVariableDefaultValue(DataObjectBase)
Returns a default value based on a column's data type.
Public methodGetMemberVariableDefaultValue(ViewColumnSchema)
Public methodGetMemberVariableName
Returns the C# member variable name for a given identifier.
Public methodGetProperties()()()()
Gets information on all of the properties on this template.
(Inherited from CodeTemplate.)
Public methodGetProperties(Boolean)
Gets information on all of the properties on this template.
(Inherited from CodeTemplate.)
Public methodGetProperty
Gets the value for the specified property.
(Inherited from CodeTemplate.)
Public methodGetPropertyAttribute
Gets the property attribute. Property attributes can be used to store various information at the property level.
(Inherited from CodeTemplate.)
Public methodGetPropertyDescription (Inherited from CodeTemplate.)
Public methodGetPropertyInfo (Inherited from CodeTemplate.)
Public methodGetPropertyName
Returns the name of the public property for a given column.
Public methodGetReaderMethod(DbType)
Returns the name of the typed reader method for a given column.
Public methodGetReaderMethod(ColumnSchema)
Returns the name of the typed reader method for a given column.
Public methodGetReaderMethod(ViewColumnSchema)
Returns the name of the typed reader method for a given column.
Public methodGetRequiredProperties
Gets information on all of the required properties for this template.
(Inherited from CodeTemplate.)
Public methodGetSpacedName
Returns a spaced out version of the identifier.
Public methodGetSqlDbType(String)
Returns the SqlDbType based on a string.
Public methodGetSqlDbType(ColumnSchema)
Public methodGetSqlDbType(ViewColumnSchema)
Public methodGetSqlParameterExtraParams(String, ColumnSchema)
Generates any extra parameters that are needed for the ADO parameter statement.
Protected methodGetSqlParameterExtraParams(String, DataObjectBase)
Generates any extra parameters that are needed for the ADO parameter statement.
Public methodGetSqlParameterExtraParams(String, ViewColumnSchema)
Generates any extra parameters that are needed for the ADO parameter statement.
Public methodGetSqlParameterStatement(ColumnSchema)
Returns a T-SQL parameter statement based on the given column.
Public methodGetSqlParameterStatement(ViewColumnSchema)
Returns a T-SQL parameter statement based on the given column.
Public methodGetSqlParameterStatement(ColumnSchema, Boolean)
Returns a T-SQL parameter statement based on the given column.
Protected methodStatic memberGetSqlParameterStatement(DataObjectBase, Boolean)
Returns a T-SQL parameter statement based on the given column.
Public methodGetSqlParameterStatement(ViewColumnSchema, Boolean)
Returns a T-SQL parameter statement based on the given column.
Public methodGetSqlParameterStatements(String, ColumnSchema)
Generates an assignment statement that adds a parameter to a ADO object for the given column.
Public methodGetSqlParameterStatements(String, ColumnSchema, String)
Generates an assignment statement that adds a parameter to a ADO object for the given column.
Public methodGetSqlReaderAssignmentStatement
Returns a typed C# reader.ReadXXX() statement.
Public methodGetTemplateAttribute
Gets the template attribute. Template attributes can be used to store various information at the template level.
(Inherited from CodeTemplate.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetValidateStatements
Generates a batch of C# validation statements based on the column.
Protected methodHasControls (Inherited from Control.)
Public methodIncludeEmptyCheck
Determines if a given column should use a check for an Empty value.
Public methodIncludeMaxLengthCheck(ColumnSchema)
Determines if the given column's data type requires a max length to be defined.
Public methodIncludeMaxLengthCheck(ViewColumnSchema)
Determines if the given column's data type requires a max length to be defined.
Public methodIsPropertyRequired (Inherited from CodeTemplate.)
Public methodIsUserDefinedType(ColumnSchema)
Determine if the given column is using a UDT.
Protected methodStatic memberIsUserDefinedType(DataObjectBase)
Determine if the given column is using a UDT.
Public methodIsUserDefinedType(ViewColumnSchema)
Determine if the given column is using a UDT.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnError
This method can be overridden to perform logic when a template exception occurs.
(Inherited from CodeTemplate.)
Protected methodOnInit
This method can be overridden to perform logic when the template instance is created.
(Inherited from CodeTemplate.)
Protected methodOnOutputRegistered
This is the method that is responsible for notifying receivers that the event occurred
(Inherited from CodeTemplate.)
Protected methodOnPostRender
Override the OnPostRender method so that we can take the result and save it to a file if an output file was specified.
(Inherited from OutputFileCodeTemplate.)
Protected methodOnPreOutputWritten(String)
This is the method that is responsible for notifying receivers that the event occurred
(Inherited from CodeTemplate.)
Protected methodOnPreOutputWritten(OutputCancelEventArgs)
This is the method that is responsible for notifying receivers that the event occurred
(Inherited from CodeTemplate.)
Protected methodOnPreRender
This method can be overridden to perform logic before the template is rendered.
(Inherited from CodeTemplate.)
Protected methodOnPropertiesLoaded
This method can be overridden to perform logic when properties are loaded.
(Inherited from CodeTemplate.)
Protected methodOnPropertiesSaved
This method can be overridden to perform logic when properties are saved.
(Inherited from CodeTemplate.)
Protected methodOnPropertyChanged
This method can be overridden to perform logic when a property changes.
(Inherited from CodeTemplate.)
Protected methodOnReferenceRegistered
Raises the ItemRegisteredEventArgs event.
(Inherited from CodeTemplate.)
Public methodParseDefaultValue
Parses the default value for properties. This can be overridden to provide custom default parsing logic.
(Inherited from CodeTemplate.)
Public methodRefreshProperties()()()() (Inherited from CodeTemplate.)
Public methodRefreshProperties(Boolean) (Inherited from CodeTemplate.)
Public methodRegisterOutput(String) (Inherited from CodeTemplate.)
Public methodRegisterOutput(OutputFile) (Inherited from CodeTemplate.)
Public methodRegisterReference
Registers the reference. When generating from within Visual Studio, these references will be added to the project.
(Inherited from CodeTemplate.)
Public methodRender
Renders to the template output to the specified writer.
(Inherited from CodeTemplate.)
Protected methodRenderChildren (Inherited from Control.)
Public methodRenderToFile(String, IMergeStrategy)
Renders the template output to a file using a merge strategy.
(Inherited from CodeTemplate.)
Public methodRenderToFile(String, Boolean)
Renders the template output to a file.
(Inherited from CodeTemplate.)
Public methodRenderToFile(OutputFile, Boolean)
Renders the template output to a file.
(Inherited from CodeTemplate.)
Public methodRenderToFile(String, String, IMergeStrategy)
Renders the template output to a file using a merge strategy.
(Inherited from CodeTemplate.)
Public methodRenderToFile(String, String, Boolean)
Renders the template output to a file.
(Inherited from CodeTemplate.)
Public methodRenderToFile(OutputFile, String, IMergeStrategy)
Renders the template output to a file using a merge strategy.
(Inherited from CodeTemplate.)
Public methodRenderToString()()()()
Renders the template output to a String.
(Inherited from CodeTemplate.)
Public methodRenderToString(String, IMergeStrategy)
Renders the template output to a String.
(Inherited from CodeTemplate.)
Public methodRestorePropertiesFromHashtable
Restores the properties from a Hashtable.
(Inherited from CodeTemplate.)
Public methodRestorePropertiesFromPropertySet (Inherited from CodeTemplate.)
Public methodRestorePropertiesFromSchema (Inherited from CodeTemplate.)
Public methodRestorePropertiesFromXml
Restores the properties from XML.
(Inherited from CodeTemplate.)
Public methodRestorePropertiesFromXmlFile
Restores the properties from XML file.
(Inherited from CodeTemplate.)
Public methodSavePropertiesToHashtable()()()()
Saves the properties to a Hashtable.
(Inherited from CodeTemplate.)
Public methodSavePropertiesToHashtable(Boolean)
Saves the properties to a Hashtable.
(Inherited from CodeTemplate.)
Public methodSavePropertiesToPropertySet (Inherited from CodeTemplate.)
Public methodSavePropertiesToXml()()()()
Saves the properties to XML.
(Inherited from CodeTemplate.)
Public methodSavePropertiesToXml(XmlWriter)
Saves the properties to XML.
(Inherited from CodeTemplate.)
Public methodSavePropertiesToXmlFile
Saves the properties to an XML file.
(Inherited from CodeTemplate.)
Protected methodSetContextData
Set the context data object for the template. Any items in the current ContextData object will be added to the new one. This method should only be called while a template is initializing.
(Inherited from CodeTemplate.)
Public methodSetProperty(PropertyInfo, Object)
Sets the value for the specified property.
(Inherited from CodeTemplate.)
Public methodSetProperty(String, Object)
Sets the value for the specified property.
(Inherited from CodeTemplate.)
Public methodSetProperty(XmlNode, String) (Inherited from CodeTemplate.)
Public methodSetPropertyAttribute
Sets the property attribute. Property attributes can be used to store various information at the property level.
(Inherited from CodeTemplate.)
Protected methodSetPropertyDefaults
This method is overridden in templates to set default values in a template instance.
(Inherited from CodeTemplate.)
Public methodSetTemplateAttribute
Sets the template attribute. Template attributes can be used to store various information at the template level.
(Inherited from CodeTemplate.)
Protected methodSetUnknownDirectiveAttributes
This method is overridden in templates to set unknown directive attributes in the ContextData.
(Inherited from CodeTemplate.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodValidate
Validates this template instance.
(Inherited from CodeTemplate.)

Fields

  NameDescription
Protected field_childControlsCreated (Inherited from Control.)
Protected field_codeTemplate (Inherited from Control.)
Protected field_controls (Inherited from Control.)
Protected field_outputFile (Inherited from OutputFileCodeTemplate.)
Protected field_parent (Inherited from Control.)
Protected field_visible (Inherited from Control.)

Properties

  NameDescription
Protected propertyChildControlsCreated (Inherited from Control.)
Protected propertyCodeTemplate (Inherited from Control.)
Public propertyCodeTemplateInfo
Gets the information for the current template.
(Inherited from CodeTemplate.)
Public propertyContextData
Contextual data items can be stored in this object and shared with sub-templates. This data will not be persisted with the template property set.
(Inherited from CodeTemplate.)
Protected propertyControls (Inherited from Control.)
Public propertyDbTypeToCSharp
Public propertyDbTypeToDataReaderMethod
Public propertyOutputFile
This property is used to specify an output file name that the template output will be saved to.
(Inherited from OutputFileCodeTemplate.)
Protected propertyParent (Inherited from Control.)
Public propertyProgress
Provides a way to report execution progress for the template.
(Inherited from CodeTemplate.)
Public propertyRegisteredOutputs (Inherited from CodeTemplate.)
Public propertyRegisteredReferences (Inherited from CodeTemplate.)
Public propertyResponse
Response stream for the template output. You can write to the stream programmatically using this property.
(Inherited from CodeTemplate.)
Public propertyState
State of this template instance.
(Inherited from CodeTemplate.)
Public propertyValidationErrors
Gets the validation errors for this template.
(Inherited from CodeTemplate.)
Protected propertyVisible (Inherited from CodeTemplate.)

Events

  NameDescription
Public eventOutputRegistered
Raised when an output file is registered
(Inherited from CodeTemplate.)
Public eventPreOutputWritten
Raised prior to an output being written to disk
(Inherited from CodeTemplate.)
Public eventPropertiesLoaded (Inherited from CodeTemplate.)
Public eventPropertiesSaved (Inherited from CodeTemplate.)
Public eventPropertyChanged (Inherited from CodeTemplate.)
Public eventReferenceRegistered
Occurs when a reference is registered.
(Inherited from CodeTemplate.)

See Also