Export (0) Print
Expand All

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.

Namespace:  Microsoft.VisualStudio.TextTemplating.VSHost
Assembly:  Microsoft.VisualStudio.TextTemplating.VSHost.12.0 (in Microsoft.VisualStudio.TextTemplating.VSHost.12.0.dll)

public class TemplatedCodeGenerator : BaseTemplatedCodeGenerator

The TemplatedCodeGenerator type exposes the following members.

Protected propertyDteGet the DTE object (Inherited from BaseCodeGeneratorWithSite.)
Protected propertyErrorListGet the Vs ErrorList object (Inherited from BaseCodeGeneratorWithSite.)
Protected propertyFileNamespacenamespace for the file. (Inherited from BaseCodeGenerator.)
Protected propertyGlobalServiceProviderProvides a wrapper on the global service provider for Visual Studio (Inherited from BaseCodeGeneratorWithSite.)
Protected propertyInputFilePathfile-path for the input file. (Inherited from BaseCodeGenerator.)
Protected propertySiteServiceProviderGet 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.)
Protected propertyTextTemplatingGet the TextTemplating service from Visual Studio (Inherited from BaseTemplatedCodeGenerator.)

Protected methodCreateExceptionMessage (Inherited from BaseCodeGeneratorWithSite.)
Public methodDispose()Releases all resources used by this instance. (Inherited from BaseCodeGenerator.)
Protected methodDispose(Boolean) (Inherited from BaseCodeGeneratorWithSite.)
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalize (Inherited from BaseCodeGenerator.)
Public methodGenerate (Inherited from BaseCodeGenerator.)
Protected methodGenerateCode (Overrides BaseTemplatedCodeGenerator.GenerateCode(String, String).)
Protected methodGeneratorErrorCallback (Inherited from BaseCodeGenerator.)
Public methodGetDefaultExtensionGet the extension of the file that should be created (Inherited from BaseTemplatedCodeGenerator.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Protected methodGetService(Guid) (Inherited from BaseCodeGeneratorWithSite.)
Protected methodGetService(Type) (Inherited from BaseCodeGeneratorWithSite.)
Public methodGetSite (Inherited from BaseCodeGeneratorWithSite.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodProcessTemplateDo the actual template processing that forms the core of this generator (Inherited from BaseTemplatedCodeGenerator.)
Public methodSetSite (Inherited from BaseCodeGeneratorWithSite.)
Protected methodSetWaitCursorSet the wait cursor until the end of this generation (Inherited from BaseCodeGeneratorWithSite.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)

Protected fieldcallback (Inherited from BaseTemplatedCodeGenerator.)

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
© 2015 Microsoft