C# Class XSharp.CodeDom.XSharpCodeDomHelper

Afficher le fichier Open project: X-Sharp/XSharpPublic Class Usage Examples

Private Properties

Свойство Type Description
DumpExpression void
DumpStatement void
FindDesignerClass System.CodeDom.CodeTypeDeclaration
FindDesignerClass System.CodeDom.CodeTypeDeclaration
MergeCodeCompileUnit System.CodeDom.CodeCompileUnit
MergeCodeCompileUnit System.CodeDom.CodeCompileUnit
Write void
WriteIndent void
WriteLine void
WriteLineIndent void

Méthodes publiques

Méthode Description
BuildDesignerFileName ( string prgFile ) : string

Return the FileName with .Designer inserted

DumpCodeCompileUnit ( CodeCompileUnit ccu, string FileName, bool append ) : void
FindFirstClass ( CodeCompileUnit ccu ) : CodeTypeDeclaration

Reading the CodeCompileUnit, enumerate all NameSpaces, enumerate All Types, searching for the first Class declaration

FindFirstClass ( CodeCompileUnit ccu, CodeNamespace &namespaceName ) : CodeTypeDeclaration
HasPartialClass ( CodeCompileUnit ccu, CodeNamespace &contextNameSpace, CodeTypeDeclaration &contextClass ) : bool

Reading the CodeCompileUnit, enumerate all NameSpaces, enumerate All Types, searching for the first Partial Class.

Private Methods

Méthode Description
DumpExpression ( System.CodeDom.CodeExpression e ) : void
DumpStatement ( StreamWriter writer, CodeStatement s ) : void
FindDesignerClass ( CodeCompileUnit ccu ) : CodeTypeDeclaration

Reading the CodeCompileUnit, enumerate all NameSpaces, enumerate All Types, searching for the first Class that contains an InitializeComponent member

FindDesignerClass ( CodeCompileUnit ccu, CodeNamespace &namespaceName ) : CodeTypeDeclaration
MergeCodeCompileUnit ( CodeCompileUnit compileUnit, CodeCompileUnit designerCompileUnit ) : CodeCompileUnit

Merge both CodeCompileUnit. The main type (class) will come from designerCompileUnit

MergeCodeCompileUnit ( CodeCompileUnit mergedCodeCompileUnit, CodeCompileUnit compileUnit, CodeCompileUnit designerCompileUnit ) : CodeCompileUnit
Write ( string str ) : void
WriteIndent ( string str ) : void
WriteLine ( string str ) : void
WriteLineIndent ( string str ) : void

Method Details

BuildDesignerFileName() public static méthode

Return the FileName with .Designer inserted
public static BuildDesignerFileName ( string prgFile ) : string
prgFile string
Résultat string

DumpCodeCompileUnit() static public méthode

static public DumpCodeCompileUnit ( CodeCompileUnit ccu, string FileName, bool append ) : void
ccu System.CodeDom.CodeCompileUnit
FileName string
append bool
Résultat void

FindFirstClass() public static méthode

Reading the CodeCompileUnit, enumerate all NameSpaces, enumerate All Types, searching for the first Class declaration
public static FindFirstClass ( CodeCompileUnit ccu ) : CodeTypeDeclaration
ccu System.CodeDom.CodeCompileUnit
Résultat System.CodeDom.CodeTypeDeclaration

FindFirstClass() public static méthode

public static FindFirstClass ( CodeCompileUnit ccu, CodeNamespace &namespaceName ) : CodeTypeDeclaration
ccu System.CodeDom.CodeCompileUnit
namespaceName System.CodeDom.CodeNamespace
Résultat System.CodeDom.CodeTypeDeclaration

HasPartialClass() public static méthode

Reading the CodeCompileUnit, enumerate all NameSpaces, enumerate All Types, searching for the first Partial Class.
public static HasPartialClass ( CodeCompileUnit ccu, CodeNamespace &contextNameSpace, CodeTypeDeclaration &contextClass ) : bool
ccu System.CodeDom.CodeCompileUnit
contextNameSpace System.CodeDom.CodeNamespace The NameSpace in wich the partial Class is defined
contextClass System.CodeDom.CodeTypeDeclaration The found partial Class
Résultat bool