C# Class Zetbox.Generator.AbstractBaseGenerator

显示文件 Open project: daszat/zetbox Class Usage Examples

Public Methods

Method Description
Generate ( Zetbox ctx, string basePath, Compiler compiler ) : void

Protected Methods

Method Description
AbstractBaseGenerator ( IEnumerable schemaProviders ) : System
DeleteOldFiles ( ) : void
Generate_AssemblyInfo ( IZetboxContext ctx ) : string
Generate_CollectionEntries ( IZetboxContext ctx ) : string
Generate_CompoundObject ( IZetboxContext ctx, CompoundObject s ) : string
Generate_Enumeration ( IZetboxContext ctx, Enumeration e ) : string
Generate_Interface ( IZetboxContext ctx, Interface i ) : string
Generate_ObjectClass ( IZetboxContext ctx, ObjectClass objClass ) : string
Generate_Objects ( Zetbox ctx ) : List
Generate_Other ( IZetboxContext ctx ) : IEnumerable
Generate_ProjectFile ( IZetboxContext ctx, string projectGuid, List generatedFileNames, IEnumerable schemaProviders ) : string
InitCodeBasePath ( string basePath ) : void
RunTemplate ( IZetboxContext ctx, string templateName, string filename ) : string
RunTemplateWithExtension ( IZetboxContext ctx, string templateName, string targetFolder, string baseFilename, string extension ) : string
SaveKeyFile ( ) : void
Unidecode ( string filename ) : string

converts the string to ascii using transliteration. uses the _transliterationTable and a nice hack to reduce utf-8 to ASCII. probably works only with western characters.

See http://stackoverflow.com/questions/2173825/slugify-and-character-transliteration-in-c/2173922#2173922

Method Details

AbstractBaseGenerator() protected method

protected AbstractBaseGenerator ( IEnumerable schemaProviders ) : System
schemaProviders IEnumerable
return System

DeleteOldFiles() protected method

protected DeleteOldFiles ( ) : void
return void

Generate() public method

public Generate ( Zetbox ctx, string basePath, Compiler compiler ) : void
ctx Zetbox
basePath string
compiler Compiler
return void

Generate_AssemblyInfo() protected method

protected Generate_AssemblyInfo ( IZetboxContext ctx ) : string
ctx IZetboxContext
return string

Generate_CollectionEntries() protected method

protected Generate_CollectionEntries ( IZetboxContext ctx ) : string
ctx IZetboxContext
return string

Generate_CompoundObject() protected method

protected Generate_CompoundObject ( IZetboxContext ctx, CompoundObject s ) : string
ctx IZetboxContext
s CompoundObject
return string

Generate_Enumeration() protected method

protected Generate_Enumeration ( IZetboxContext ctx, Enumeration e ) : string
ctx IZetboxContext
e Enumeration
return string

Generate_Interface() protected method

protected Generate_Interface ( IZetboxContext ctx, Interface i ) : string
ctx IZetboxContext
i Interface
return string

Generate_ObjectClass() protected method

protected Generate_ObjectClass ( IZetboxContext ctx, ObjectClass objClass ) : string
ctx IZetboxContext
objClass ObjectClass
return string

Generate_Objects() protected method

protected Generate_Objects ( Zetbox ctx ) : List
ctx Zetbox
return List

Generate_Other() protected method

protected Generate_Other ( IZetboxContext ctx ) : IEnumerable
ctx IZetboxContext
return IEnumerable

Generate_ProjectFile() protected method

protected Generate_ProjectFile ( IZetboxContext ctx, string projectGuid, List generatedFileNames, IEnumerable schemaProviders ) : string
ctx IZetboxContext
projectGuid string
generatedFileNames List
schemaProviders IEnumerable
return string

InitCodeBasePath() protected method

protected InitCodeBasePath ( string basePath ) : void
basePath string
return void

RunTemplate() protected method

protected RunTemplate ( IZetboxContext ctx, string templateName, string filename ) : string
ctx IZetboxContext
templateName string
filename string
return string

RunTemplateWithExtension() protected method

protected RunTemplateWithExtension ( IZetboxContext ctx, string templateName, string targetFolder, string baseFilename, string extension ) : string
ctx IZetboxContext
templateName string
targetFolder string
baseFilename string
extension string
return string

SaveKeyFile() protected method

protected SaveKeyFile ( ) : void
return void

Unidecode() protected static method

converts the string to ascii using transliteration. uses the _transliterationTable and a nice hack to reduce utf-8 to ASCII. probably works only with western characters.
See http://stackoverflow.com/questions/2173825/slugify-and-character-transliteration-in-c/2173922#2173922
protected static Unidecode ( string filename ) : string
filename string
return string