The CodeTemplate type exposes the following members.
Constructors
Name | Description | |
---|---|---|
CodeTemplate | Initializes a new instance of the CodeTemplate class |
Methods
Name | Description | |
---|---|---|
ControlAdded | (Inherited from Control.) | |
ControlRemoved | (Inherited from Control.) | |
CopyPropertiesTo(CodeTemplate) |
Copies any matching properties to another CodeTemplate instance.
| |
CopyPropertiesTo(CodeTemplate, Boolean) |
Copies any matching properties to another CodeTemplate instance.
| |
CopyPropertiesTo(CodeTemplate, ICollection<(Of <<'(String>)>>)) |
Copies any matching properties to another CodeTemplate instance.
| |
CopyPropertiesTo(CodeTemplate, Boolean, ICollection<(Of <<'(String>)>>)) |
Copies any matching properties to another CodeTemplate instance.
| |
Create<(Of <<'(T>)>>)()()()() |
Gets an instance of the specified template type. Should be used with the Register directive.
| |
Create<(Of <<'(T>)>>)(Boolean) |
Gets an instance of the specified template type. Should be used with the Register directive.
| |
CreateChildControls | (Inherited from Control.) | |
CreateControlCollection | (Inherited from Control.) | |
Dispose()()()() | Releases all resources used by the CodeTemplate | |
Dispose(Boolean) | Releases the unmanaged resources used by the CodeTemplate and optionally releases the managed resources | |
EnsureChildControls | (Inherited from Control.) | |
Equals | (Inherited from Object.) | |
Finalize | (Overrides Object..::..Finalize()()()().) | |
GetCodeTemplateInstance(String) |
Gets an instance of the specified template.
| |
GetCodeTemplateInstance(String, Boolean) |
Gets an instance of the specified template.
| |
GetCodeTemplateInstance(String, Boolean, Boolean) |
Gets an instance of the specified template.
| |
GetCustomValidationErrors |
Allows the developer to add custom ValidationErrors to the validation collection.
| |
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.
| |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetProperties()()()() |
Gets information on all of the properties on this template.
| |
GetProperties(Boolean) |
Gets information on all of the properties on this template.
| |
GetProperty |
Gets the value for the specified property.
| |
GetPropertyAttribute |
Gets the property attribute. Property attributes can be used to store various information at the property level.
| |
GetPropertyDescription | ||
GetPropertyInfo | ||
GetRequiredProperties |
Gets information on all of the required properties for this template.
| |
GetTemplateAttribute |
Gets the template attribute. Template attributes can be used to store various information at the template level.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
HasControls | (Inherited from Control.) | |
IsPropertyRequired | ||
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.
| |
OnInit |
This method can be overridden to perform logic when the template instance is created.
| |
OnOutputRegistered |
This is the method that is responsible for notifying
receivers that the event occurred
| |
OnPostRender |
This method can be overridden to perform logic after the template is rendered.
| |
OnPreOutputWritten(String) |
This is the method that is responsible for notifying
receivers that the event occurred
| |
OnPreOutputWritten(OutputCancelEventArgs) |
This is the method that is responsible for notifying
receivers that the event occurred
| |
OnPreRender |
This method can be overridden to perform logic before the template is rendered.
| |
OnPropertiesLoaded |
This method can be overridden to perform logic when properties are loaded.
| |
OnPropertiesSaved |
This method can be overridden to perform logic when properties are saved.
| |
OnPropertyChanged |
This method can be overridden to perform logic when a property changes.
| |
OnReferenceRegistered |
Raises the ItemRegisteredEventArgs event.
| |
ParseDefaultValue |
Parses the default value for properties. This can be overridden to provide custom default parsing logic.
| |
RefreshProperties()()()() | ||
RefreshProperties(Boolean) | ||
RegisterOutput(String) | ||
RegisterOutput(OutputFile) | ||
RegisterReference |
Registers the reference. When generating from within Visual Studio, these references will be added to the project.
| |
Render |
Renders to the template output to the specified writer.
(Overrides Control..::..Render(TextWriter).) | |
RenderChildren | (Inherited from Control.) | |
RenderToFile(String, IMergeStrategy) |
Renders the template output to a file using a merge strategy.
| |
RenderToFile(String, Boolean) |
Renders the template output to a file.
| |
RenderToFile(OutputFile, Boolean) |
Renders the template output to a file.
| |
RenderToFile(String, String, IMergeStrategy) |
Renders the template output to a file using a merge strategy.
| |
RenderToFile(String, String, Boolean) |
Renders the template output to a file.
| |
RenderToFile(OutputFile, String, IMergeStrategy) |
Renders the template output to a file using a merge strategy.
| |
RenderToString()()()() |
Renders the template output to a String.
| |
RenderToString(String, IMergeStrategy) |
Renders the template output to a String.
| |
RestorePropertiesFromHashtable |
Restores the properties from a Hashtable.
| |
RestorePropertiesFromPropertySet | ||
RestorePropertiesFromSchema | ||
RestorePropertiesFromXml |
Restores the properties from XML.
| |
RestorePropertiesFromXmlFile |
Restores the properties from XML file.
| |
SavePropertiesToHashtable()()()() |
Saves the properties to a Hashtable.
| |
SavePropertiesToHashtable(Boolean) |
Saves the properties to a Hashtable.
| |
SavePropertiesToPropertySet | ||
SavePropertiesToXml()()()() |
Saves the properties to XML.
| |
SavePropertiesToXml(XmlWriter) |
Saves the properties to XML.
| |
SavePropertiesToXmlFile |
Saves the properties to an XML file.
| |
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.
| |
SetProperty(PropertyInfo, Object) |
Sets the value for the specified property.
| |
SetProperty(String, Object) |
Sets the value for the specified property.
| |
SetProperty(XmlNode, String) | ||
SetPropertyAttribute |
Sets the property attribute. Property attributes can be used to store various information at the property level.
| |
SetPropertyDefaults |
This method is overridden in templates to set default values in a template instance.
| |
SetTemplateAttribute |
Sets the template attribute. Template attributes can be used to store various information at the template level.
| |
SetUnknownDirectiveAttributes |
This method is overridden in templates to set unknown directive attributes in the ContextData.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Validate |
Validates this template instance.
|
Fields
Name | Description | |
---|---|---|
_childControlsCreated | (Inherited from Control.) | |
_codeTemplate | (Inherited from Control.) | |
_controls | (Inherited from Control.) | |
_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.
| |
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.
| |
Controls | (Inherited from Control.) | |
Parent | (Inherited from Control.) | |
Progress |
Provides a way to report execution progress for the template.
| |
RegisteredOutputs | ||
RegisteredReferences | ||
Response |
Response stream for the template output. You can write to the stream programmatically using this property.
| |
State |
State of this template instance.
| |
ValidationErrors |
Gets the validation errors for this template.
| |
Visible | (Overrides Control..::..Visible.) |
Events
Name | Description | |
---|---|---|
OutputRegistered |
Raised when an output file is registered
| |
PreOutputWritten |
Raised prior to an output being written to disk
| |
PropertiesLoaded | ||
PropertiesSaved | ||
PropertyChanged | ||
ReferenceRegistered |
Occurs when a reference is registered.
|