C# Class Mono.CSharp.CSharpCodeGenerator

Inheritance: System.CodeDom.Compiler.CodeGenerator
Show file Open project: runefs/Marvin

Public Methods

Method Description
CSharpCodeGenerator ( ) : System
CSharpCodeGenerator ( string>.IDictionary providerOptions ) : System
ValidateIdentifier ( string identifier ) : void

Protected Methods

Method Description
CreateEscapedIdentifier ( string value ) : string
CreateValidIdentifier ( string value ) : string
GenerateArgumentReferenceExpression ( CodeArgumentReferenceExpression expression ) : void
GenerateArrayCreateExpression ( CodeArrayCreateExpression expression ) : void
GenerateArrayIndexerExpression ( CodeArrayIndexerExpression expression ) : void
GenerateAssignStatement ( CodeAssignStatement statement ) : void
GenerateAttachEventStatement ( System.CodeDom.CodeAttachEventStatement statement ) : void
GenerateAttributeDeclarationsEnd ( CodeAttributeDeclarationCollection attributes ) : void
GenerateAttributeDeclarationsStart ( CodeAttributeDeclarationCollection attributes ) : void
GenerateBaseReferenceExpression ( CodeBaseReferenceExpression expression ) : void
GenerateCastExpression ( CodeCastExpression expression ) : void
GenerateComment ( CodeComment comment ) : void
GenerateCompileUnit ( CodeCompileUnit compileUnit ) : void
GenerateCompileUnitStart ( CodeCompileUnit compileUnit ) : void
GenerateConditionStatement ( CodeConditionStatement statement ) : void
GenerateConstructor ( CodeConstructor constructor, CodeTypeDeclaration declaration ) : void
GenerateDecimalValue ( decimal d ) : void
GenerateDefaultValueExpression ( CodeDefaultValueExpression e ) : void
GenerateDelegateCreateExpression ( CodeDelegateCreateExpression expression ) : void
GenerateDelegateInvokeExpression ( CodeDelegateInvokeExpression expression ) : void
GenerateDirectives ( CodeDirectiveCollection directives ) : void
GenerateEntryPointMethod ( CodeEntryPointMethod method, CodeTypeDeclaration declaration ) : void
GenerateEvent ( CodeMemberEvent eventRef, CodeTypeDeclaration declaration ) : void
GenerateEventReferenceExpression ( CodeEventReferenceExpression expression ) : void
GenerateExpressionStatement ( CodeExpressionStatement statement ) : void
GenerateField ( CodeMemberField field ) : void
GenerateFieldReferenceExpression ( CodeFieldReferenceExpression expression ) : void
GenerateGotoStatement ( CodeGotoStatement statement ) : void
GenerateIndexerExpression ( CodeIndexerExpression expression ) : void
GenerateIterationStatement ( CodeIterationStatement statement ) : void
GenerateLabeledStatement ( CodeLabeledStatement statement ) : void
GenerateLinePragmaEnd ( CodeLinePragma linePragma ) : void
GenerateLinePragmaStart ( CodeLinePragma linePragma ) : void
GenerateMethod ( CodeMemberMethod method, CodeTypeDeclaration declaration ) : void
GenerateMethodInvokeExpression ( CodeMethodInvokeExpression expression ) : void
GenerateMethodReferenceExpression ( CodeMethodReferenceExpression expression ) : void
GenerateMethodReturnStatement ( CodeMethodReturnStatement statement ) : void
GenerateNamespaceEnd ( CodeNamespace ns ) : void
GenerateNamespaceImport ( CodeNamespaceImport import ) : void
GenerateNamespaceStart ( CodeNamespace ns ) : void
GenerateObjectCreateExpression ( CodeObjectCreateExpression expression ) : void
GenerateParameterDeclarationExpression ( CodeParameterDeclarationExpression e ) : void
GeneratePrimitiveExpression ( CodePrimitiveExpression e ) : void
GenerateProperty ( CodeMemberProperty property, CodeTypeDeclaration declaration ) : void
GeneratePropertyReferenceExpression ( CodePropertyReferenceExpression expression ) : void
GeneratePropertySetValueReferenceExpression ( CodePropertySetValueReferenceExpression expression ) : void
GenerateRemoveEventStatement ( CodeRemoveEventStatement statement ) : void
GenerateSingleFloatValue ( float f ) : void
GenerateSnippetExpression ( CodeSnippetExpression expression ) : void
GenerateSnippetMember ( CodeSnippetTypeMember member ) : void
GenerateThisReferenceExpression ( CodeThisReferenceExpression expression ) : void
GenerateThrowExceptionStatement ( CodeThrowExceptionStatement statement ) : void
GenerateTryCatchFinallyStatement ( CodeTryCatchFinallyStatement statement ) : void
GenerateTypeConstructor ( CodeTypeConstructor constructor ) : void
GenerateTypeEnd ( CodeTypeDeclaration declaration ) : void
GenerateTypeOfExpression ( CodeTypeOfExpression e ) : void
GenerateTypeStart ( CodeTypeDeclaration declaration ) : void
GenerateVariableDeclarationStatement ( CodeVariableDeclarationStatement statement ) : void
GenerateVariableReferenceExpression ( CodeVariableReferenceExpression expression ) : void
GetTypeOutput ( CodeTypeReference type ) : string
IsValidIdentifier ( string identifier ) : bool
OutputFieldScopeModifier ( MemberAttributes attributes ) : void
OutputMemberAccessModifier ( MemberAttributes attributes ) : void
OutputMemberScopeModifier ( MemberAttributes attributes ) : void
OutputType ( CodeTypeReference type ) : void
Supports ( GeneratorSupport supports ) : bool

Private Methods

Method Description
DetermineTypeOutput ( CodeTypeReference type ) : string
FillKeywordTable ( ) : void
GenerateCharValue ( char c ) : void
GenerateCodeChecksumPragma ( CodeChecksumPragma pragma ) : void
GenerateCodeRegionDirective ( CodeRegionDirective region ) : void
GenerateGenericsConstraints ( CodeTypeParameterCollection parameters ) : void
GenerateGenericsParameters ( CodeTypeParameterCollection parameters ) : void
GetSafeName ( string id ) : string
GetTypeArguments ( CodeTypeReferenceCollection collection ) : string
IsAbstract ( MemberAttributes attributes ) : bool
OutputAttributeDeclaration ( CodeAttributeDeclaration attribute ) : void
OutputAttributes ( CodeAttributeDeclarationCollection attributes, string prefix, bool inline ) : void
OutputStartBrace ( ) : void
OutputTypeArguments ( CodeTypeReferenceCollection typeArguments, StringBuilder sb, int count ) : void
OutputTypeAttributes ( CodeTypeDeclaration declaration ) : void
OutputVTableModifier ( MemberAttributes attributes ) : void
QuoteSnippetString ( string value ) : string
is_identifier_part_character ( char c ) : bool
is_identifier_start_character ( char c ) : bool

Method Details

CSharpCodeGenerator() public method

public CSharpCodeGenerator ( ) : System
return System

CSharpCodeGenerator() public method

public CSharpCodeGenerator ( string>.IDictionary providerOptions ) : System
providerOptions string>.IDictionary
return System

CreateEscapedIdentifier() protected method

protected CreateEscapedIdentifier ( string value ) : string
value string
return string

CreateValidIdentifier() protected method

protected CreateValidIdentifier ( string value ) : string
value string
return string

GenerateArgumentReferenceExpression() protected method

protected GenerateArgumentReferenceExpression ( CodeArgumentReferenceExpression expression ) : void
expression System.CodeDom.CodeArgumentReferenceExpression
return void

GenerateArrayCreateExpression() protected method

protected GenerateArrayCreateExpression ( CodeArrayCreateExpression expression ) : void
expression System.CodeDom.CodeArrayCreateExpression
return void

GenerateArrayIndexerExpression() protected method

protected GenerateArrayIndexerExpression ( CodeArrayIndexerExpression expression ) : void
expression System.CodeDom.CodeArrayIndexerExpression
return void

GenerateAssignStatement() protected method

protected GenerateAssignStatement ( CodeAssignStatement statement ) : void
statement System.CodeDom.CodeAssignStatement
return void

GenerateAttachEventStatement() protected method

protected GenerateAttachEventStatement ( System.CodeDom.CodeAttachEventStatement statement ) : void
statement System.CodeDom.CodeAttachEventStatement
return void

GenerateAttributeDeclarationsEnd() protected method

protected GenerateAttributeDeclarationsEnd ( CodeAttributeDeclarationCollection attributes ) : void
attributes System.CodeDom.CodeAttributeDeclarationCollection
return void

GenerateAttributeDeclarationsStart() protected method

protected GenerateAttributeDeclarationsStart ( CodeAttributeDeclarationCollection attributes ) : void
attributes CodeAttributeDeclarationCollection
return void

GenerateBaseReferenceExpression() protected method

protected GenerateBaseReferenceExpression ( CodeBaseReferenceExpression expression ) : void
expression CodeBaseReferenceExpression
return void

GenerateCastExpression() protected method

protected GenerateCastExpression ( CodeCastExpression expression ) : void
expression CodeCastExpression
return void

GenerateComment() protected method

protected GenerateComment ( CodeComment comment ) : void
comment CodeComment
return void

GenerateCompileUnit() protected method

protected GenerateCompileUnit ( CodeCompileUnit compileUnit ) : void
compileUnit CodeCompileUnit
return void

GenerateCompileUnitStart() protected method

protected GenerateCompileUnitStart ( CodeCompileUnit compileUnit ) : void
compileUnit CodeCompileUnit
return void

GenerateConditionStatement() protected method

protected GenerateConditionStatement ( CodeConditionStatement statement ) : void
statement CodeConditionStatement
return void

GenerateConstructor() protected method

protected GenerateConstructor ( CodeConstructor constructor, CodeTypeDeclaration declaration ) : void
constructor CodeConstructor
declaration CodeTypeDeclaration
return void

GenerateDecimalValue() protected method

protected GenerateDecimalValue ( decimal d ) : void
d decimal
return void

GenerateDefaultValueExpression() protected method

protected GenerateDefaultValueExpression ( CodeDefaultValueExpression e ) : void
e CodeDefaultValueExpression
return void

GenerateDelegateCreateExpression() protected method

protected GenerateDelegateCreateExpression ( CodeDelegateCreateExpression expression ) : void
expression CodeDelegateCreateExpression
return void

GenerateDelegateInvokeExpression() protected method

protected GenerateDelegateInvokeExpression ( CodeDelegateInvokeExpression expression ) : void
expression CodeDelegateInvokeExpression
return void

GenerateDirectives() protected method

protected GenerateDirectives ( CodeDirectiveCollection directives ) : void
directives CodeDirectiveCollection
return void

GenerateEntryPointMethod() protected method

protected GenerateEntryPointMethod ( CodeEntryPointMethod method, CodeTypeDeclaration declaration ) : void
method CodeEntryPointMethod
declaration CodeTypeDeclaration
return void

GenerateEvent() protected method

protected GenerateEvent ( CodeMemberEvent eventRef, CodeTypeDeclaration declaration ) : void
eventRef CodeMemberEvent
declaration CodeTypeDeclaration
return void

GenerateEventReferenceExpression() protected method

protected GenerateEventReferenceExpression ( CodeEventReferenceExpression expression ) : void
expression CodeEventReferenceExpression
return void

GenerateExpressionStatement() protected method

protected GenerateExpressionStatement ( CodeExpressionStatement statement ) : void
statement CodeExpressionStatement
return void

GenerateField() protected method

protected GenerateField ( CodeMemberField field ) : void
field CodeMemberField
return void

GenerateFieldReferenceExpression() protected method

protected GenerateFieldReferenceExpression ( CodeFieldReferenceExpression expression ) : void
expression CodeFieldReferenceExpression
return void

GenerateGotoStatement() protected method

protected GenerateGotoStatement ( CodeGotoStatement statement ) : void
statement CodeGotoStatement
return void

GenerateIndexerExpression() protected method

protected GenerateIndexerExpression ( CodeIndexerExpression expression ) : void
expression CodeIndexerExpression
return void

GenerateIterationStatement() protected method

protected GenerateIterationStatement ( CodeIterationStatement statement ) : void
statement CodeIterationStatement
return void

GenerateLabeledStatement() protected method

protected GenerateLabeledStatement ( CodeLabeledStatement statement ) : void
statement CodeLabeledStatement
return void

GenerateLinePragmaEnd() protected method

protected GenerateLinePragmaEnd ( CodeLinePragma linePragma ) : void
linePragma CodeLinePragma
return void

GenerateLinePragmaStart() protected method

protected GenerateLinePragmaStart ( CodeLinePragma linePragma ) : void
linePragma CodeLinePragma
return void

GenerateMethod() protected method

protected GenerateMethod ( CodeMemberMethod method, CodeTypeDeclaration declaration ) : void
method CodeMemberMethod
declaration CodeTypeDeclaration
return void

GenerateMethodInvokeExpression() protected method

protected GenerateMethodInvokeExpression ( CodeMethodInvokeExpression expression ) : void
expression CodeMethodInvokeExpression
return void

GenerateMethodReferenceExpression() protected method

protected GenerateMethodReferenceExpression ( CodeMethodReferenceExpression expression ) : void
expression CodeMethodReferenceExpression
return void

GenerateMethodReturnStatement() protected method

protected GenerateMethodReturnStatement ( CodeMethodReturnStatement statement ) : void
statement CodeMethodReturnStatement
return void

GenerateNamespaceEnd() protected method

protected GenerateNamespaceEnd ( CodeNamespace ns ) : void
ns CodeNamespace
return void

GenerateNamespaceImport() protected method

protected GenerateNamespaceImport ( CodeNamespaceImport import ) : void
import CodeNamespaceImport
return void

GenerateNamespaceStart() protected method

protected GenerateNamespaceStart ( CodeNamespace ns ) : void
ns CodeNamespace
return void

GenerateObjectCreateExpression() protected method

protected GenerateObjectCreateExpression ( CodeObjectCreateExpression expression ) : void
expression CodeObjectCreateExpression
return void

GenerateParameterDeclarationExpression() protected method

protected GenerateParameterDeclarationExpression ( CodeParameterDeclarationExpression e ) : void
e CodeParameterDeclarationExpression
return void

GeneratePrimitiveExpression() protected method

protected GeneratePrimitiveExpression ( CodePrimitiveExpression e ) : void
e CodePrimitiveExpression
return void

GenerateProperty() protected method

protected GenerateProperty ( CodeMemberProperty property, CodeTypeDeclaration declaration ) : void
property CodeMemberProperty
declaration CodeTypeDeclaration
return void

GeneratePropertyReferenceExpression() protected method

protected GeneratePropertyReferenceExpression ( CodePropertyReferenceExpression expression ) : void
expression CodePropertyReferenceExpression
return void

GeneratePropertySetValueReferenceExpression() protected method

protected GeneratePropertySetValueReferenceExpression ( CodePropertySetValueReferenceExpression expression ) : void
expression CodePropertySetValueReferenceExpression
return void

GenerateRemoveEventStatement() protected method

protected GenerateRemoveEventStatement ( CodeRemoveEventStatement statement ) : void
statement CodeRemoveEventStatement
return void

GenerateSingleFloatValue() protected method

protected GenerateSingleFloatValue ( float f ) : void
f float
return void

GenerateSnippetExpression() protected method

protected GenerateSnippetExpression ( CodeSnippetExpression expression ) : void
expression CodeSnippetExpression
return void

GenerateSnippetMember() protected method

protected GenerateSnippetMember ( CodeSnippetTypeMember member ) : void
member CodeSnippetTypeMember
return void

GenerateThisReferenceExpression() protected method

protected GenerateThisReferenceExpression ( CodeThisReferenceExpression expression ) : void
expression CodeThisReferenceExpression
return void

GenerateThrowExceptionStatement() protected method

protected GenerateThrowExceptionStatement ( CodeThrowExceptionStatement statement ) : void
statement CodeThrowExceptionStatement
return void

GenerateTryCatchFinallyStatement() protected method

protected GenerateTryCatchFinallyStatement ( CodeTryCatchFinallyStatement statement ) : void
statement CodeTryCatchFinallyStatement
return void

GenerateTypeConstructor() protected method

protected GenerateTypeConstructor ( CodeTypeConstructor constructor ) : void
constructor CodeTypeConstructor
return void

GenerateTypeEnd() protected method

protected GenerateTypeEnd ( CodeTypeDeclaration declaration ) : void
declaration CodeTypeDeclaration
return void

GenerateTypeOfExpression() protected method

protected GenerateTypeOfExpression ( CodeTypeOfExpression e ) : void
e CodeTypeOfExpression
return void

GenerateTypeStart() protected method

protected GenerateTypeStart ( CodeTypeDeclaration declaration ) : void
declaration CodeTypeDeclaration
return void

GenerateVariableDeclarationStatement() protected method

protected GenerateVariableDeclarationStatement ( CodeVariableDeclarationStatement statement ) : void
statement CodeVariableDeclarationStatement
return void

GenerateVariableReferenceExpression() protected method

protected GenerateVariableReferenceExpression ( CodeVariableReferenceExpression expression ) : void
expression CodeVariableReferenceExpression
return void

GetTypeOutput() protected method

protected GetTypeOutput ( CodeTypeReference type ) : string
type CodeTypeReference
return string

IsValidIdentifier() protected method

protected IsValidIdentifier ( string identifier ) : bool
identifier string
return bool

OutputFieldScopeModifier() protected method

protected OutputFieldScopeModifier ( MemberAttributes attributes ) : void
attributes MemberAttributes
return void

OutputMemberAccessModifier() protected method

protected OutputMemberAccessModifier ( MemberAttributes attributes ) : void
attributes MemberAttributes
return void

OutputMemberScopeModifier() protected method

protected OutputMemberScopeModifier ( MemberAttributes attributes ) : void
attributes MemberAttributes
return void

OutputType() protected method

protected OutputType ( CodeTypeReference type ) : void
type CodeTypeReference
return void

Supports() protected method

protected Supports ( GeneratorSupport supports ) : bool
supports GeneratorSupport
return bool

ValidateIdentifier() public method

public ValidateIdentifier ( string identifier ) : void
identifier string
return void