The SqlCodeTemplate type exposes the following members.
Constructors
Name | Description | |
---|---|---|
SqlCodeTemplate | Initializes a new instance of the SqlCodeTemplate class |
Methods
Name | Description | |
---|---|---|
ControlAdded | (Inherited from Control.) | |
ControlRemoved | (Inherited from Control.) | |
CopyPropertiesTo(CodeTemplate) |
Copies any matching properties to another CodeTemplate instance.
(Inherited from CodeTemplate.) | |
CopyPropertiesTo(CodeTemplate, Boolean) |
Copies any matching properties to another CodeTemplate instance.
(Inherited from CodeTemplate.) | |
CopyPropertiesTo(CodeTemplate, ICollection<(Of <<'(String>)>>)) |
Copies any matching properties to another CodeTemplate instance.
(Inherited from CodeTemplate.) | |
CopyPropertiesTo(CodeTemplate, Boolean, ICollection<(Of <<'(String>)>>)) |
Copies any matching properties to another CodeTemplate instance.
(Inherited from CodeTemplate.) | |
Create<(Of <<'(T>)>>)()()()() |
Gets an instance of the specified template type. Should be used with the Register directive.
(Inherited from CodeTemplate.) | |
Create<(Of <<'(T>)>>)(Boolean) |
Gets an instance of the specified template type. Should be used with the Register directive.
(Inherited from CodeTemplate.) | |
CreateChildControls | (Inherited from Control.) | |
CreateControlCollection | (Inherited from Control.) | |
Dispose()()()() | (Inherited from CodeTemplate.) | |
Dispose(Boolean) | (Inherited from CodeTemplate.) | |
EnsureChildControls | (Inherited from Control.) | |
Equals | (Inherited from Object.) | |
Finalize | (Inherited from CodeTemplate.) | |
GetCamelCaseName |
Returns a camel cased name from the given identifier.
| |
GetCodeTemplateInstance(String) |
Gets an instance of the specified template.
(Inherited from CodeTemplate.) | |
GetCodeTemplateInstance(String, Boolean) |
Gets an instance of the specified template.
(Inherited from CodeTemplate.) | |
GetCodeTemplateInstance(String, Boolean, Boolean) |
Gets an instance of the specified template.
(Inherited from CodeTemplate.) | |
GetCSharpVariableType(DbType) |
Returns the C# variable type based on the given dataType.
| |
GetCSharpVariableType(ColumnSchema) |
Returns the C# variable type based on the given column.
| |
GetCSharpVariableType(CommandResultColumnSchema) |
Returns the C# variable type based on the given column.
| |
GetCSharpVariableType(ParameterSchema) |
Returns the C# variable type based on the given parameter.
| |
GetCSharpVariableType(ViewColumnSchema) |
Returns the C# variable type based on the given column.
| |
GetCustomValidationErrors |
Allows the developer to add custom ValidationErrors to the validation collection.
(Inherited from CodeTemplate.) | |
GetDelimitedIdentifier(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
| |
GetDelimitedIdentifier(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
| |
GetFileName |
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.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetMemberVariableDeclarationStatement(ColumnSchema) |
Returns a C# member variable declaration statement.
| |
GetMemberVariableDeclarationStatement(ViewColumnSchema) |
Returns a C# member variable declaration statement.
| |
GetMemberVariableDeclarationStatement(String, ColumnSchema) |
Returns a C# member variable declaration statement.
| |
GetMemberVariableDeclarationStatement(String, DataObjectBase) |
Returns a C# member variable declaration statement.
| |
GetMemberVariableDeclarationStatement(String, ViewColumnSchema) |
Returns a C# member variable declaration statement.
| |
GetMemberVariableDefaultValue(ColumnSchema) | ||
GetMemberVariableDefaultValue(DataObjectBase) |
Returns a default value based on a column's data type.
| |
GetMemberVariableDefaultValue(ViewColumnSchema) | ||
GetMemberVariableName |
Returns the C# member variable name for a given identifier.
| |
GetProperties()()()() |
Gets information on all of the properties on this template.
(Inherited from CodeTemplate.) | |
GetProperties(Boolean) |
Gets information on all of the properties on this template.
(Inherited from CodeTemplate.) | |
GetProperty |
Gets the value for the specified property.
(Inherited from CodeTemplate.) | |
GetPropertyAttribute |
Gets the property attribute. Property attributes can be used to store various information at the property level.
(Inherited from CodeTemplate.) | |
GetPropertyDescription | (Inherited from CodeTemplate.) | |
GetPropertyInfo | (Inherited from CodeTemplate.) | |
GetPropertyName |
Returns the name of the public property for a given column.
| |
GetReaderMethod(DbType) |
Returns the name of the typed reader method for a given column.
| |
GetReaderMethod(ColumnSchema) |
Returns the name of the typed reader method for a given column.
| |
GetReaderMethod(ViewColumnSchema) |
Returns the name of the typed reader method for a given column.
| |
GetRequiredProperties |
Gets information on all of the required properties for this template.
(Inherited from CodeTemplate.) | |
GetSpacedName |
Returns a spaced out version of the identifier.
| |
GetSqlDbType(String) |
Returns the SqlDbType based on a string.
| |
GetSqlDbType(ColumnSchema) | ||
GetSqlDbType(ViewColumnSchema) | ||
GetSqlParameterExtraParams(String, ColumnSchema) |
Generates any extra parameters that are needed for the ADO parameter statement.
| |
GetSqlParameterExtraParams(String, DataObjectBase) |
Generates any extra parameters that are needed for the ADO parameter statement.
| |
GetSqlParameterExtraParams(String, ViewColumnSchema) |
Generates any extra parameters that are needed for the ADO parameter statement.
| |
GetSqlParameterStatement(ColumnSchema) |
Returns a T-SQL parameter statement based on the given column.
| |
GetSqlParameterStatement(ViewColumnSchema) |
Returns a T-SQL parameter statement based on the given column.
| |
GetSqlParameterStatement(ColumnSchema, Boolean) |
Returns a T-SQL parameter statement based on the given column.
| |
GetSqlParameterStatement(DataObjectBase, Boolean) |
Returns a T-SQL parameter statement based on the given column.
| |
GetSqlParameterStatement(ViewColumnSchema, Boolean) |
Returns a T-SQL parameter statement based on the given column.
| |
GetSqlParameterStatements(String, ColumnSchema) |
Generates an assignment statement that adds a parameter to a ADO object for the given column.
| |
GetSqlParameterStatements(String, ColumnSchema, String) |
Generates an assignment statement that adds a parameter to a ADO object for the given column.
| |
GetSqlReaderAssignmentStatement |
Returns a typed C# reader.ReadXXX() statement.
| |
GetTemplateAttribute |
Gets the template attribute. Template attributes can be used to store various information at the template level.
(Inherited from CodeTemplate.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetValidateStatements |
Generates a batch of C# validation statements based on the column.
| |
HasControls | (Inherited from Control.) | |
IncludeEmptyCheck |
Determines if a given column should use a check for an Empty value.
| |
IncludeMaxLengthCheck(ColumnSchema) |
Determines if the given column's data type requires a max length to be defined.
| |
IncludeMaxLengthCheck(ViewColumnSchema) |
Determines if the given column's data type requires a max length to be defined.
| |
IsPropertyRequired | (Inherited from CodeTemplate.) | |
IsUserDefinedType(ColumnSchema) |
Determine if the given column is using a UDT.
| |
IsUserDefinedType(DataObjectBase) |
Determine if the given column is using a UDT.
| |
IsUserDefinedType(ViewColumnSchema) |
Determine if the given column is using a UDT.
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnError |
This method can be overridden to perform logic when a template exception occurs.
(Inherited from CodeTemplate.) | |
OnInit |
This method can be overridden to perform logic when the template instance is created.
(Inherited from CodeTemplate.) | |
OnOutputRegistered |
This is the method that is responsible for notifying
receivers that the event occurred
(Inherited from CodeTemplate.) | |
OnPostRender |
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.) | |
OnPreOutputWritten(String) |
This is the method that is responsible for notifying
receivers that the event occurred
(Inherited from CodeTemplate.) | |
OnPreOutputWritten(OutputCancelEventArgs) |
This is the method that is responsible for notifying
receivers that the event occurred
(Inherited from CodeTemplate.) | |
OnPreRender |
This method can be overridden to perform logic before the template is rendered.
(Inherited from CodeTemplate.) | |
OnPropertiesLoaded |
This method can be overridden to perform logic when properties are loaded.
(Inherited from CodeTemplate.) | |
OnPropertiesSaved |
This method can be overridden to perform logic when properties are saved.
(Inherited from CodeTemplate.) | |
OnPropertyChanged |
This method can be overridden to perform logic when a property changes.
(Inherited from CodeTemplate.) | |
OnReferenceRegistered |
Raises the ItemRegisteredEventArgs event.
(Inherited from CodeTemplate.) | |
ParseDefaultValue |
Parses the default value for properties. This can be overridden to provide custom default parsing logic.
(Inherited from CodeTemplate.) | |
RefreshProperties()()()() | (Inherited from CodeTemplate.) | |
RefreshProperties(Boolean) | (Inherited from CodeTemplate.) | |
RegisterOutput(String) | (Inherited from CodeTemplate.) | |
RegisterOutput(OutputFile) | (Inherited from CodeTemplate.) | |
RegisterReference |
Registers the reference. When generating from within Visual Studio, these references will be added to the project.
(Inherited from CodeTemplate.) | |
Render |
Renders to the template output to the specified writer.
(Inherited from CodeTemplate.) | |
RenderChildren | (Inherited from Control.) | |
RenderToFile(String, IMergeStrategy) |
Renders the template output to a file using a merge strategy.
(Inherited from CodeTemplate.) | |
RenderToFile(String, Boolean) |
Renders the template output to a file.
(Inherited from CodeTemplate.) | |
RenderToFile(OutputFile, Boolean) |
Renders the template output to a file.
(Inherited from CodeTemplate.) | |
RenderToFile(String, String, IMergeStrategy) |
Renders the template output to a file using a merge strategy.
(Inherited from CodeTemplate.) | |
RenderToFile(String, String, Boolean) |
Renders the template output to a file.
(Inherited from CodeTemplate.) | |
RenderToFile(OutputFile, String, IMergeStrategy) |
Renders the template output to a file using a merge strategy.
(Inherited from CodeTemplate.) | |
RenderToString()()()() |
Renders the template output to a String.
(Inherited from CodeTemplate.) | |
RenderToString(String, IMergeStrategy) |
Renders the template output to a String.
(Inherited from CodeTemplate.) | |
RestorePropertiesFromHashtable |
Restores the properties from a Hashtable.
(Inherited from CodeTemplate.) | |
RestorePropertiesFromPropertySet | (Inherited from CodeTemplate.) | |
RestorePropertiesFromSchema | (Inherited from CodeTemplate.) | |
RestorePropertiesFromXml |
Restores the properties from XML.
(Inherited from CodeTemplate.) | |
RestorePropertiesFromXmlFile |
Restores the properties from XML file.
(Inherited from CodeTemplate.) | |
SavePropertiesToHashtable()()()() |
Saves the properties to a Hashtable.
(Inherited from CodeTemplate.) | |
SavePropertiesToHashtable(Boolean) |
Saves the properties to a Hashtable.
(Inherited from CodeTemplate.) | |
SavePropertiesToPropertySet | (Inherited from CodeTemplate.) | |
SavePropertiesToXml()()()() |
Saves the properties to XML.
(Inherited from CodeTemplate.) | |
SavePropertiesToXml(XmlWriter) |
Saves the properties to XML.
(Inherited from CodeTemplate.) | |
SavePropertiesToXmlFile |
Saves the properties to an XML file.
(Inherited from CodeTemplate.) | |
SetContextData |
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.) | |
SetProperty(PropertyInfo, Object) |
Sets the value for the specified property.
(Inherited from CodeTemplate.) | |
SetProperty(String, Object) |
Sets the value for the specified property.
(Inherited from CodeTemplate.) | |
SetProperty(XmlNode, String) | (Inherited from CodeTemplate.) | |
SetPropertyAttribute |
Sets the property attribute. Property attributes can be used to store various information at the property level.
(Inherited from CodeTemplate.) | |
SetPropertyDefaults |
This method is overridden in templates to set default values in a template instance.
(Inherited from CodeTemplate.) | |
SetTemplateAttribute |
Sets the template attribute. Template attributes can be used to store various information at the template level.
(Inherited from CodeTemplate.) | |
SetUnknownDirectiveAttributes |
This method is overridden in templates to set unknown directive attributes in the ContextData.
(Inherited from CodeTemplate.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Validate |
Validates this template instance.
(Inherited from CodeTemplate.) |
Fields
Name | Description | |
---|---|---|
_childControlsCreated | (Inherited from Control.) | |
_codeTemplate | (Inherited from Control.) | |
_controls | (Inherited from Control.) | |
_outputFile | (Inherited from OutputFileCodeTemplate.) | |
_parent | (Inherited from Control.) | |
_visible | (Inherited from Control.) |
Properties
Name | Description | |
---|---|---|
ChildControlsCreated | (Inherited from Control.) | |
CodeTemplate | (Inherited from Control.) | |
CodeTemplateInfo |
Gets the information for the current template.
(Inherited from CodeTemplate.) | |
ContextData |
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.) | |
Controls | (Inherited from Control.) | |
DbTypeToCSharp | ||
DbTypeToDataReaderMethod | ||
OutputFile |
This property is used to specify an output file name that the template output will be saved to.
(Inherited from OutputFileCodeTemplate.) | |
Parent | (Inherited from Control.) | |
Progress |
Provides a way to report execution progress for the template.
(Inherited from CodeTemplate.) | |
RegisteredOutputs | (Inherited from CodeTemplate.) | |
RegisteredReferences | (Inherited from CodeTemplate.) | |
Response |
Response stream for the template output. You can write to the stream programmatically using this property.
(Inherited from CodeTemplate.) | |
State |
State of this template instance.
(Inherited from CodeTemplate.) | |
ValidationErrors |
Gets the validation errors for this template.
(Inherited from CodeTemplate.) | |
Visible | (Inherited from CodeTemplate.) |
Events
Name | Description | |
---|---|---|
OutputRegistered |
Raised when an output file is registered
(Inherited from CodeTemplate.) | |
PreOutputWritten |
Raised prior to an output being written to disk
(Inherited from CodeTemplate.) | |
PropertiesLoaded | (Inherited from CodeTemplate.) | |
PropertiesSaved | (Inherited from CodeTemplate.) | |
PropertyChanged | (Inherited from CodeTemplate.) | |
ReferenceRegistered |
Occurs when a reference is registered.
(Inherited from CodeTemplate.) |