TemplatedCodeGenerator Class
Parses a file template to produce its output. Only a single generator is needed for any style of template as the custom code is handled with directive providers.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.TextTemplating.VSHost.BaseCodeGenerator
Microsoft.VisualStudio.TextTemplating.VSHost.BaseCodeGeneratorWithSite
Microsoft.VisualStudio.TextTemplating.VSHost.BaseTemplatedCodeGenerator
Microsoft.VisualStudio.TextTemplating.VSHost.TemplatedCodeGenerator
Namespace: Microsoft.VisualStudio.TextTemplating.VSHost
Assembly: Microsoft.VisualStudio.TextTemplating.VSHost.12.0 (in Microsoft.VisualStudio.TextTemplating.VSHost.12.0.dll)
Syntax
'Declaration
<GuidAttribute("B9C665D2-0451-4ae2-A38C-443B85D634F2")> _
Public Class TemplatedCodeGenerator _
Inherits BaseTemplatedCodeGenerator
[GuidAttribute("B9C665D2-0451-4ae2-A38C-443B85D634F2")]
public class TemplatedCodeGenerator : BaseTemplatedCodeGenerator
[GuidAttribute(L"B9C665D2-0451-4ae2-A38C-443B85D634F2")]
public ref class TemplatedCodeGenerator : public BaseTemplatedCodeGenerator
[<GuidAttribute("B9C665D2-0451-4ae2-A38C-443B85D634F2")>]
type TemplatedCodeGenerator =
class
inherit BaseTemplatedCodeGenerator
end
public class TemplatedCodeGenerator extends BaseTemplatedCodeGenerator
The TemplatedCodeGenerator type exposes the following members.
Constructors
Name | Description | |
---|---|---|
TemplatedCodeGenerator |
Top
Properties
Name | Description | |
---|---|---|
Dte | Get the DTE object (Inherited from BaseCodeGeneratorWithSite.) | |
ErrorList | Get the Vs ErrorList object (Inherited from BaseCodeGeneratorWithSite.) | |
FileNamespace | namespace for the file. (Inherited from BaseCodeGenerator.) | |
GlobalServiceProvider | Provides a wrapper on the global service provider for Visual Studio (Inherited from BaseCodeGeneratorWithSite.) | |
InputFilePath | file-path for the input file. (Inherited from BaseCodeGenerator.) | |
SiteServiceProvider | Get a wrapper on the containing project system's Service provider <remarks> This is a limited service provider that can only reliably provide VxDTE::SID_SVSProjectItem SID_SVSWebReferenceDynamicProperties IID_IVsHierarchy SID_SVsApplicationSettings To get the global provider, call GetSite on IVSHierarchy or use the GlobalServiceProvider property </remarks> (Inherited from BaseCodeGeneratorWithSite.) | |
TextTemplating | Get the TextTemplating service from Visual Studio (Inherited from BaseTemplatedCodeGenerator.) |
Top
Methods
Name | Description | |
---|---|---|
CreateExceptionMessage | (Inherited from BaseCodeGeneratorWithSite.) | |
Dispose() | Releases all resources used by this instance. (Inherited from BaseCodeGenerator.) | |
Dispose(Boolean) | (Inherited from BaseCodeGeneratorWithSite.) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | (Inherited from BaseCodeGenerator.) | |
Generate | (Inherited from BaseCodeGenerator.) | |
GenerateCode | (Overrides BaseTemplatedCodeGenerator.GenerateCode(String, String).) | |
GeneratorErrorCallback | (Inherited from BaseCodeGenerator.) | |
GetDefaultExtension | Get the extension of the file that should be created (Inherited from BaseTemplatedCodeGenerator.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetService(Guid) | (Inherited from BaseCodeGeneratorWithSite.) | |
GetService(Type) | (Inherited from BaseCodeGeneratorWithSite.) | |
GetSite | (Inherited from BaseCodeGeneratorWithSite.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ProcessTemplate | Do the actual template processing that forms the core of this generator (Inherited from BaseTemplatedCodeGenerator.) | |
SetSite | (Inherited from BaseCodeGeneratorWithSite.) | |
SetWaitCursor | Set the wait cursor until the end of this generation (Inherited from BaseCodeGeneratorWithSite.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Fields
Name | Description | |
---|---|---|
callback | (Inherited from BaseTemplatedCodeGenerator.) |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
IVsSingleFileGenerator.DefaultExtension | (Inherited from BaseCodeGenerator.) | |
IVsSingleFileGenerator.Generate | (Inherited from BaseCodeGenerator.) |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.