This documentation is archived and is not being maintained.

CodeGenerator Members

Provides an example implementation of the ICodeGenerator interface. This class is abstract.

The following tables list the members exposed by the CodeGenerator type.

  Name Description
Protected method CodeGenerator Initializes a new instance of the CodeGenerator class.
Top

  Name Description
Protected property CurrentClass Gets the code type declaration for the current class.
Protected property CurrentMember Gets the current member of the class.
Protected property CurrentMemberName Gets the current member name.
Protected property CurrentTypeName Gets the current class name.
Protected property Indent Gets or sets the amount of spaces to indent each indentation level.
Protected property IsCurrentClass Gets a value indicating whether the current object being generated is a class.
Protected property IsCurrentDelegate Gets a value indicating whether the current object being generated is a delegate.
Protected property IsCurrentEnum Gets a value indicating whether the current object being generated is an enumeration.
Protected property IsCurrentInterface Gets a value indicating whether the current object being generated is an interface.
Protected property IsCurrentStruct Gets a value indicating whether the current object being generated is a value type or struct.
Protected property NullToken Gets the token that represents a null reference (Nothing in Visual Basic).
Protected property Options Gets the options to be used by the code generator.
Protected property Output Gets the TextWriter to use for output.
Top

(see also Protected Methods )
  Name Description
Public method Equals  Overloaded. Determines whether two Object instances are equal. (inherited from Object)
Public method GenerateCodeFromMember Generates code for the specified class member using the specified text writer and code generator options.
Public method GetHashCode  Serves as a hash function for a particular type. (inherited from Object)
Public method GetType  Gets the Type of the current instance. (inherited from Object)
Public method Static IsValidLanguageIndependentIdentifier Gets a value indicating whether the specified string is a valid identifier.
Public method Static ReferenceEquals  Determines whether the specified Object instances are the same instance. (inherited from Object)
Public method ToString  Returns a String that represents the current Object. (inherited from Object)
Public method Static ValidateIdentifiers Attempts to validate each identifier field contained in the specified CodeObject or System.CodeDom tree.
Top

  Name Description
Protected method ContinueOnNewLine Generates a line-continuation character and outputs the specified string on a new line.
Protected method CreateEscapedIdentifier Creates an escaped identifier for the specified value.
Protected method CreateValidIdentifier Creates a valid identifier for the specified value.
Protected method Finalize  Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (inherited from Object)
Protected method GenerateArgumentReferenceExpression Generates code for the specified argument reference expression.
Protected method GenerateArrayCreateExpression Generates code for the specified array creation expression.
Protected method GenerateArrayIndexerExpression Generates code for the specified array indexer expression.
Protected method GenerateAssignStatement Generates code for the specified assignment statement.
Protected method GenerateAttachEventStatement Generates code for the specified attach event statement.
Protected method GenerateAttributeDeclarationsEnd Generates code for the specified attribute block end.
Protected method GenerateAttributeDeclarationsStart Generates code for the specified attribute block start.
Protected method GenerateBaseReferenceExpression Generates code for the specified base reference expression.
Protected method GenerateBinaryOperatorExpression Generates code for the specified binary operator expression.
Protected method GenerateCastExpression Generates code for the specified cast expression.
Protected method GenerateComment Generates code for the specified comment.
Protected method GenerateCommentStatement Generates code for the specified comment statement.
Protected method GenerateCommentStatements Generates code for the specified comment statements.
Protected method GenerateCompileUnit Generates code for the specified compile unit.
Protected method GenerateCompileUnitEnd Generates code for the end of a compile unit.
Protected method GenerateCompileUnitStart Generates code for the start of a compile unit.
Protected method GenerateConditionStatement Generates code for the specified conditional statement.
Protected method GenerateConstructor Generates code for the specified constructor.
Protected method GenerateDecimalValue Generates code for the specified decimal value.
Protected method GenerateDefaultValueExpression Generates code for the specified code default value expression.
Protected method GenerateDelegateCreateExpression Generates code for the specified delegate creation expression.
Protected method GenerateDelegateInvokeExpression Generates code for the specified delegate invoke expression.
Protected method GenerateDirectionExpression Generates code for the specified direction expression.
Protected method GenerateDirectives Generates code for the specified code directives.
Protected method GenerateDoubleValue Generates code for a double-precision floating point number.
Protected method GenerateEntryPointMethod Generates code for the specified entry point method.
Protected method GenerateEvent Generates code for the specified event.
Protected method GenerateEventReferenceExpression Generates code for the specified event reference expression.
Protected method GenerateExpression Generates code for the specified code expression.
Protected method GenerateExpressionStatement Generates code for the specified expression statement.
Protected method GenerateField Generates code for the specified member field.
Protected method GenerateFieldReferenceExpression Generates code for the specified field reference expression.
Protected method GenerateGotoStatement Generates code for the specified goto statement.
Protected method GenerateIndexerExpression Generates code for the specified indexer expression.
Protected method GenerateIterationStatement Generates code for the specified iteration statement.
Protected method GenerateLabeledStatement Generates code for the specified labeled statement.
Protected method GenerateLinePragmaEnd Generates code for the specified line pragma end.
Protected method GenerateLinePragmaStart Generates code for the specified line pragma start.
Protected method GenerateMethod Generates code for the specified method.
Protected method GenerateMethodInvokeExpression Generates code for the specified method invoke expression.
Protected method GenerateMethodReferenceExpression Generates code for the specified method reference expression.
Protected method GenerateMethodReturnStatement Generates code for the specified method return statement.
Protected method GenerateNamespace Generates code for the specified namespace.
Protected method GenerateNamespaceEnd Generates code for the end of a namespace.
Protected method GenerateNamespaceImport Generates code for the specified namespace import.
Protected method GenerateNamespaceImports Generates code for the specified namespace import.
Protected method GenerateNamespaces Generates code for the namespaces in the specified compile unit.
Protected method GenerateNamespaceStart Generates code for the start of a namespace.
Protected method GenerateObjectCreateExpression Generates code for the specified object creation expression.
Protected method GenerateParameterDeclarationExpression Generates code for the specified parameter declaration expression.
Protected method GeneratePrimitiveExpression Generates code for the specified primitive expression.
Protected method GenerateProperty Generates code for the specified property.
Protected method GeneratePropertyReferenceExpression Generates code for the specified property reference expression.
Protected method GeneratePropertySetValueReferenceExpression Generates code for the specified property set value reference expression.
Protected method GenerateRemoveEventStatement Generates code for the specified remove event statement.
Protected method GenerateSingleFloatValue Generates code for a single-precision floating point number.
Protected method GenerateSnippetCompileUnit Outputs the code of the specified literal code fragment compile unit.
Protected method GenerateSnippetExpression Outputs the code of the specified literal code fragment expression.
Protected method GenerateSnippetMember Outputs the code of the specified literal code fragment class member.
Protected method GenerateSnippetStatement Outputs the code of the specified literal code fragment statement.
Protected method GenerateStatement Generates code for the specified statement.
Protected method GenerateStatements Generates code for the specified statement collection.
Protected method GenerateThisReferenceExpression Generates code for the specified this reference expression.
Protected method GenerateThrowExceptionStatement Generates code for the specified throw exception statement.
Protected method GenerateTryCatchFinallyStatement Generates code for the specified try...catch...finally statement.
Protected method GenerateTypeConstructor Generates code for the specified class constructor.
Protected method GenerateTypeEnd Generates code for the specified end class.
Protected method GenerateTypeOfExpression Generates code for the specified type of expression.
Protected method GenerateTypeReferenceExpression Generates code for the specified type reference expression.
Protected method GenerateTypes Generates code for the specified namespace and the classes it contains.
Protected method GenerateTypeStart Generates code for the specified start class.
Protected method GenerateVariableDeclarationStatement Generates code for the specified variable declaration statement.
Protected method GenerateVariableReferenceExpression Generates code for the specified variable reference expression.
Protected method GetTypeOutput Gets the name of the specified data type.
Protected method IsValidIdentifier Gets a value indicating whether the specified value is a valid identifier.
Protected method MemberwiseClone  Creates a shallow copy of the current Object. (inherited from Object)
Protected method OutputAttributeArgument Outputs an argument in an attribute block.
Protected method OutputAttributeDeclarations Generates code for the specified attribute declaration collection.
Protected method OutputDirection Generates code for the specified FieldDirection.
Protected method OutputExpressionList Overloaded. Generates code for the specified expression list.
Protected method OutputFieldScopeModifier Outputs a field scope modifier that corresponds to the specified attributes.
Protected method OutputIdentifier Outputs the specified identifier.
Protected method OutputMemberAccessModifier Generates code for the specified member access modifier.
Protected method OutputMemberScopeModifier Generates code for the specified member scope modifier.
Protected method OutputOperator Generates code for the specified operator.
Protected method OutputParameters Generates code for the specified parameters.
Protected method OutputType Generates code for the specified type.
Protected method OutputTypeAttributes Generates code for the specified type attributes.
Protected method OutputTypeNamePair Generates code for the specified object type and name pair.
Protected method QuoteSnippetString Converts the specified string by formatting it with escape codes.
Protected method Supports Gets a value indicating whether the specified code generation support is provided.
Protected method ValidateIdentifier Throws an exception if the specified string is not a valid identifier.
Top

  Name Description
Explicit interface implementation Method System.CodeDom.Compiler.ICodeGenerator.CreateEscapedIdentifier Creates an escaped identifier for the specified value.
Explicit interface implementation Method System.CodeDom.Compiler.ICodeGenerator.CreateValidIdentifier Creates a valid identifier for the specified value.
Explicit interface implementation Method System.CodeDom.Compiler.ICodeGenerator.GenerateCodeFromCompileUnit Generates code for the specified Code Document Object Model (CodeDOM) compilation unit and outputs it to the specified text writer using the specified options.
Explicit interface implementation Method System.CodeDom.Compiler.ICodeGenerator.GenerateCodeFromExpression Generates code for the specified Code Document Object Model (CodeDOM) expression and outputs it to the specified text writer.
Explicit interface implementation Method System.CodeDom.Compiler.ICodeGenerator.GenerateCodeFromNamespace Generates code for the specified Code Document Object Model (CodeDOM) namespace and outputs it to the specified text writer using the specified options.
Explicit interface implementation Method System.CodeDom.Compiler.ICodeGenerator.GenerateCodeFromStatement Generates code for the specified Code Document Object Model (CodeDOM) statement and outputs it to the specified text writer using the specified options.
Explicit interface implementation Method System.CodeDom.Compiler.ICodeGenerator.GenerateCodeFromType Generates code for the specified Code Document Object Model (CodeDOM) type declaration and outputs it to the specified text writer using the specified options.
Explicit interface implementation Method System.CodeDom.Compiler.ICodeGenerator.GetTypeOutput Gets the type indicated by the specified CodeTypeReference.
Explicit interface implementation Method System.CodeDom.Compiler.ICodeGenerator.IsValidIdentifier Gets a value that indicates whether the specified value is a valid identifier for the current language.
Explicit interface implementation Method System.CodeDom.Compiler.ICodeGenerator.Supports Gets a value indicating whether the generator provides support for the language features represented by the specified GeneratorSupport object.
Explicit interface implementation Method System.CodeDom.Compiler.ICodeGenerator.ValidateIdentifier Throws an exception if the specified value is not a valid identifier.
Top
Show: