C# Класс XSharp.CodeDom.XSharpCodeDomHelper

Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
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

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

Метод Описание
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.

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

Метод Описание
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

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

BuildDesignerFileName() публичный статический Метод

Return the FileName with .Designer inserted
public static BuildDesignerFileName ( string prgFile ) : string
prgFile string
Результат string

DumpCodeCompileUnit() статический публичный Метод

static public DumpCodeCompileUnit ( CodeCompileUnit ccu, string FileName, bool append ) : void
ccu System.CodeDom.CodeCompileUnit
FileName string
append bool
Результат void

FindFirstClass() публичный статический Метод

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
Результат System.CodeDom.CodeTypeDeclaration

FindFirstClass() публичный статический Метод

public static FindFirstClass ( CodeCompileUnit ccu, CodeNamespace &namespaceName ) : CodeTypeDeclaration
ccu System.CodeDom.CodeCompileUnit
namespaceName System.CodeDom.CodeNamespace
Результат System.CodeDom.CodeTypeDeclaration

HasPartialClass() публичный статический Метод

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
Результат bool