C# Класс Microsoft.CSharp.CSharpCodeGenerator

Наследование: ICodeCompiler, ICodeGenerator
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AppendEscapedChar void
CSharpCodeGenerator System
CSharpCodeGenerator System
ContinueOnNewLine void
FromDom System.CodeDom.Compiler.CompilerResults
FromDomBatch System.CodeDom.Compiler.CompilerResults
FromFile System.CodeDom.Compiler.CompilerResults
FromFileBatch System.CodeDom.Compiler.CompilerResults
FromSource System.CodeDom.Compiler.CompilerResults
FromSourceBatch System.CodeDom.Compiler.CompilerResults
GenerateArgumentReferenceExpression void
GenerateArrayCreateExpression void
GenerateArrayIndexerExpression void
GenerateAssignStatement void
GenerateAttachEventStatement void
GenerateAttributeDeclarationsEnd void
GenerateAttributeDeclarationsStart void
GenerateAttributes void
GenerateAttributes void
GenerateAttributes void
GenerateBaseReferenceExpression void
GenerateBinaryOperatorExpression void
GenerateCastExpression void
GenerateChecksumPragma void
GenerateCodeRegionDirective void
GenerateComment void
GenerateCommentStatement void
GenerateCommentStatements void
GenerateCompileUnit void
GenerateCompileUnitEnd void
GenerateCompileUnitStart void
GenerateConditionStatement void
GenerateConstructor void
GenerateConstructors void
GenerateDecimalValue void
GenerateDefaultValueExpression void
GenerateDelegateCreateExpression void
GenerateDelegateInvokeExpression void
GenerateDirectionExpression void
GenerateDirectives void
GenerateDoubleValue void
GenerateEntryPointMethod void
GenerateEvent void
GenerateEventReferenceExpression void
GenerateEvents void
GenerateExpression void
GenerateExpressionStatement void
GenerateField void
GenerateFieldReferenceExpression void
GenerateFields void
GenerateGotoStatement void
GenerateIndexerExpression void
GenerateIterationStatement void
GenerateLabeledStatement void
GenerateLinePragmaEnd void
GenerateLinePragmaStart void
GenerateMethod void
GenerateMethodInvokeExpression void
GenerateMethodReferenceExpression void
GenerateMethodReturnStatement void
GenerateMethods void
GenerateNamespace void
GenerateNamespaceEnd void
GenerateNamespaceImport void
GenerateNamespaceImports void
GenerateNamespaceStart void
GenerateNamespaces void
GenerateNestedTypes void
GenerateObjectCreateExpression void
GenerateParameterDeclarationExpression void
GeneratePrimitiveChar void
GeneratePrimitiveExpression void
GeneratePrimitiveExpressionBase void
GenerateProperties void
GenerateProperty void
GeneratePropertyReferenceExpression void
GeneratePropertySetValueReferenceExpression void
GenerateRemoveEventStatement void
GenerateSingleFloatValue void
GenerateSnippetCompileUnit void
GenerateSnippetExpression void
GenerateSnippetMember void
GenerateSnippetMembers void
GenerateSnippetStatement void
GenerateStatement void
GenerateStatements void
GenerateThisReferenceExpression void
GenerateThrowExceptionStatement void
GenerateTryCatchFinallyStatement void
GenerateType void
GenerateTypeConstructor void
GenerateTypeConstructors void
GenerateTypeEnd void
GenerateTypeMember void
GenerateTypeOfExpression void
GenerateTypeReferenceExpression void
GenerateTypeStart void
GenerateTypes void
GenerateVariableDeclarationStatement void
GenerateVariableReferenceExpression void
GetBaseTypeOutput string
GetTypeArgumentsOutput string
GetTypeArgumentsOutput void
GetUserData bool
ICodeCompiler CompilerResults
ICodeCompiler CompilerResults
ICodeGenerator void
ICodeGenerator void
ICodeGenerator void
ICodeGenerator void
ICodeGenerator void
JoinStringArray string
OutputAttributeArgument void
OutputDirection void
OutputExpressionList void
OutputExpressionList void
OutputFieldScopeModifier void
OutputIdentifier void
OutputMemberAccessModifier void
OutputMemberScopeModifier void
OutputOperator void
OutputParameters void
OutputStartingBrace void
OutputType void
OutputTypeAttributes void
OutputTypeNamePair void
OutputTypeParameterConstraints void
OutputTypeParameters void
OutputVTableModifier void
QuoteSnippetString string
QuoteSnippetStringCStyle string
QuoteSnippetStringVerbatimStyle string
ResolveReferencedAssemblies void

Открытые методы

Метод Описание
CreateEscapedIdentifier ( string name ) : string
CreateValidIdentifier ( string name ) : string
GenerateCodeFromMember ( CodeTypeMember member, TextWriter writer, CodeGeneratorOptions options ) : void
GetTypeOutput ( CodeTypeReference typeRef ) : string
IsValidIdentifier ( string value ) : bool
Supports ( GeneratorSupport support ) : bool
ValidateIdentifier ( string value ) : void

Приватные методы

Метод Описание
AppendEscapedChar ( StringBuilder b, char value ) : void
CSharpCodeGenerator ( ) : System
CSharpCodeGenerator ( string>.IDictionary providerOptions ) : System
ContinueOnNewLine ( string st ) : void
FromDom ( CompilerParameters options, CodeCompileUnit e ) : CompilerResults
FromDomBatch ( CompilerParameters options, CodeCompileUnit ea ) : CompilerResults
FromFile ( CompilerParameters options, string fileName ) : CompilerResults
FromFileBatch ( CompilerParameters options, string fileNames ) : CompilerResults
FromSource ( CompilerParameters options, string source ) : CompilerResults
FromSourceBatch ( CompilerParameters options, string sources ) : CompilerResults
GenerateArgumentReferenceExpression ( CodeArgumentReferenceExpression e ) : void
GenerateArrayCreateExpression ( CodeArrayCreateExpression e ) : void
GenerateArrayIndexerExpression ( CodeArrayIndexerExpression e ) : void
GenerateAssignStatement ( CodeAssignStatement e ) : void
GenerateAttachEventStatement ( System.CodeDom.CodeAttachEventStatement e ) : void
GenerateAttributeDeclarationsEnd ( CodeAttributeDeclarationCollection attributes ) : void
GenerateAttributeDeclarationsStart ( CodeAttributeDeclarationCollection attributes ) : void
GenerateAttributes ( CodeAttributeDeclarationCollection attributes ) : void
GenerateAttributes ( CodeAttributeDeclarationCollection attributes, string prefix ) : void
GenerateAttributes ( CodeAttributeDeclarationCollection attributes, string prefix, bool inLine ) : void
GenerateBaseReferenceExpression ( System.CodeDom.CodeBaseReferenceExpression e ) : void
GenerateBinaryOperatorExpression ( CodeBinaryOperatorExpression e ) : void
GenerateCastExpression ( CodeCastExpression e ) : void
GenerateChecksumPragma ( CodeChecksumPragma checksumPragma ) : void
GenerateCodeRegionDirective ( System.CodeDom.CodeRegionDirective regionDirective ) : void
GenerateComment ( CodeComment e ) : void
GenerateCommentStatement ( CodeCommentStatement e ) : void
GenerateCommentStatements ( CodeCommentStatementCollection e ) : void
GenerateCompileUnit ( CodeCompileUnit e ) : void
GenerateCompileUnitEnd ( CodeCompileUnit e ) : void
GenerateCompileUnitStart ( CodeCompileUnit e ) : void
GenerateConditionStatement ( CodeConditionStatement e ) : void
GenerateConstructor ( CodeConstructor e, CodeTypeDeclaration c ) : void
GenerateConstructors ( CodeTypeDeclaration e ) : void
GenerateDecimalValue ( decimal d ) : void
GenerateDefaultValueExpression ( CodeDefaultValueExpression e ) : void
GenerateDelegateCreateExpression ( CodeDelegateCreateExpression e ) : void
GenerateDelegateInvokeExpression ( CodeDelegateInvokeExpression e ) : void
GenerateDirectionExpression ( CodeDirectionExpression e ) : void
GenerateDirectives ( CodeDirectiveCollection directives ) : void
GenerateDoubleValue ( double d ) : void
GenerateEntryPointMethod ( CodeEntryPointMethod e, CodeTypeDeclaration c ) : void
GenerateEvent ( CodeMemberEvent e, CodeTypeDeclaration c ) : void
GenerateEventReferenceExpression ( CodeEventReferenceExpression e ) : void
GenerateEvents ( CodeTypeDeclaration e ) : void
GenerateExpression ( CodeExpression e ) : void
GenerateExpressionStatement ( CodeExpressionStatement e ) : void
GenerateField ( CodeMemberField e ) : void
GenerateFieldReferenceExpression ( CodeFieldReferenceExpression e ) : void
GenerateFields ( CodeTypeDeclaration e ) : void
GenerateGotoStatement ( CodeGotoStatement e ) : void
GenerateIndexerExpression ( CodeIndexerExpression e ) : void
GenerateIterationStatement ( CodeIterationStatement e ) : void
GenerateLabeledStatement ( CodeLabeledStatement e ) : void
GenerateLinePragmaEnd ( CodeLinePragma e ) : void
GenerateLinePragmaStart ( CodeLinePragma e ) : void
GenerateMethod ( CodeMemberMethod e, CodeTypeDeclaration c ) : void
GenerateMethodInvokeExpression ( CodeMethodInvokeExpression e ) : void
GenerateMethodReferenceExpression ( CodeMethodReferenceExpression e ) : void
GenerateMethodReturnStatement ( CodeMethodReturnStatement e ) : void
GenerateMethods ( CodeTypeDeclaration e ) : void
GenerateNamespace ( CodeNamespace e ) : void
GenerateNamespaceEnd ( CodeNamespace e ) : void
GenerateNamespaceImport ( CodeNamespaceImport e ) : void
GenerateNamespaceImports ( CodeNamespace e ) : void
GenerateNamespaceStart ( CodeNamespace e ) : void
GenerateNamespaces ( CodeCompileUnit e ) : void
GenerateNestedTypes ( CodeTypeDeclaration e ) : void
GenerateObjectCreateExpression ( CodeObjectCreateExpression e ) : void
GenerateParameterDeclarationExpression ( CodeParameterDeclarationExpression e ) : void
GeneratePrimitiveChar ( char c ) : void
GeneratePrimitiveExpression ( CodePrimitiveExpression e ) : void
GeneratePrimitiveExpressionBase ( CodePrimitiveExpression e ) : void
GenerateProperties ( CodeTypeDeclaration e ) : void
GenerateProperty ( CodeMemberProperty e, CodeTypeDeclaration c ) : void
GeneratePropertyReferenceExpression ( CodePropertyReferenceExpression e ) : void
GeneratePropertySetValueReferenceExpression ( CodePropertySetValueReferenceExpression e ) : void
GenerateRemoveEventStatement ( CodeRemoveEventStatement e ) : void
GenerateSingleFloatValue ( float s ) : void
GenerateSnippetCompileUnit ( CodeSnippetCompileUnit e ) : void
GenerateSnippetExpression ( CodeSnippetExpression e ) : void
GenerateSnippetMember ( CodeSnippetTypeMember e ) : void
GenerateSnippetMembers ( CodeTypeDeclaration e ) : void
GenerateSnippetStatement ( CodeSnippetStatement e ) : void
GenerateStatement ( CodeStatement e ) : void
GenerateStatements ( CodeStatementCollection stmts ) : void
GenerateThisReferenceExpression ( CodeThisReferenceExpression e ) : void
GenerateThrowExceptionStatement ( CodeThrowExceptionStatement e ) : void
GenerateTryCatchFinallyStatement ( CodeTryCatchFinallyStatement e ) : void
GenerateType ( CodeTypeDeclaration e ) : void
GenerateTypeConstructor ( CodeTypeConstructor e ) : void
GenerateTypeConstructors ( CodeTypeDeclaration e ) : void
GenerateTypeEnd ( CodeTypeDeclaration e ) : void
GenerateTypeMember ( CodeTypeMember member, CodeTypeDeclaration declaredType ) : void
GenerateTypeOfExpression ( CodeTypeOfExpression e ) : void
GenerateTypeReferenceExpression ( CodeTypeReferenceExpression e ) : void
GenerateTypeStart ( CodeTypeDeclaration e ) : void
GenerateTypes ( CodeNamespace e ) : void
GenerateVariableDeclarationStatement ( CodeVariableDeclarationStatement e ) : void
GenerateVariableReferenceExpression ( CodeVariableReferenceExpression e ) : void
GetBaseTypeOutput ( CodeTypeReference typeRef ) : string
GetTypeArgumentsOutput ( CodeTypeReferenceCollection typeArguments ) : string
GetTypeArgumentsOutput ( CodeTypeReferenceCollection typeArguments, int start, int length, StringBuilder sb ) : void
GetUserData ( CodeObject e, string property, bool defaultValue ) : bool
ICodeCompiler ( CompilerParameters options, CodeCompileUnit e ) : CompilerResults
ICodeCompiler ( CompilerParameters options, string fileName ) : CompilerResults
ICodeGenerator ( CodeCompileUnit e, TextWriter w, CodeGeneratorOptions o ) : void
ICodeGenerator ( CodeExpression e, TextWriter w, CodeGeneratorOptions o ) : void
ICodeGenerator ( CodeNamespace e, TextWriter w, CodeGeneratorOptions o ) : void
ICodeGenerator ( CodeStatement e, TextWriter w, CodeGeneratorOptions o ) : void
ICodeGenerator ( CodeTypeDeclaration e, TextWriter w, CodeGeneratorOptions o ) : void
JoinStringArray ( string sa, string separator ) : string
OutputAttributeArgument ( CodeAttributeArgument arg ) : void
OutputDirection ( FieldDirection dir ) : void
OutputExpressionList ( CodeExpressionCollection expressions ) : void
OutputExpressionList ( CodeExpressionCollection expressions, bool newlineBetweenItems ) : void
OutputFieldScopeModifier ( MemberAttributes attributes ) : void
OutputIdentifier ( string ident ) : void
OutputMemberAccessModifier ( MemberAttributes attributes ) : void
OutputMemberScopeModifier ( MemberAttributes attributes ) : void
OutputOperator ( CodeBinaryOperatorType op ) : void
OutputParameters ( CodeParameterDeclarationExpressionCollection parameters ) : void
OutputStartingBrace ( ) : void
OutputType ( CodeTypeReference typeRef ) : void
OutputTypeAttributes ( CodeTypeDeclaration e ) : void
OutputTypeNamePair ( CodeTypeReference typeRef, string name ) : void
OutputTypeParameterConstraints ( CodeTypeParameterCollection typeParameters ) : void
OutputTypeParameters ( CodeTypeParameterCollection typeParameters ) : void
OutputVTableModifier ( MemberAttributes attributes ) : void
QuoteSnippetString ( string value ) : string
QuoteSnippetStringCStyle ( string value ) : string
QuoteSnippetStringVerbatimStyle ( string value ) : string
ResolveReferencedAssemblies ( CompilerParameters options, CodeCompileUnit e ) : void

Описание методов

CreateEscapedIdentifier() публичный Метод

public CreateEscapedIdentifier ( string name ) : string
name string
Результат string

CreateValidIdentifier() публичный Метод

public CreateValidIdentifier ( string name ) : string
name string
Результат string

GenerateCodeFromMember() публичный Метод

public GenerateCodeFromMember ( CodeTypeMember member, TextWriter writer, CodeGeneratorOptions options ) : void
member System.CodeDom.CodeTypeMember
writer System.IO.TextWriter
options System.CodeDom.Compiler.CodeGeneratorOptions
Результат void

GetTypeOutput() публичный Метод

public GetTypeOutput ( CodeTypeReference typeRef ) : string
typeRef CodeTypeReference
Результат string

IsValidIdentifier() публичный Метод

public IsValidIdentifier ( string value ) : bool
value string
Результат bool

Supports() публичный Метод

public Supports ( GeneratorSupport support ) : bool
support GeneratorSupport
Результат bool

ValidateIdentifier() публичный Метод

public ValidateIdentifier ( string value ) : void
value string
Результат void