C# Class EFUtility.CodeGenerationTools.CodeRegion

Responsible for creating source code regions in code when the loop inside actually produces something.
Show file Open project: jradxl/Entity-Framework-Code-Generation-Tools-Experiments Class Usage Examples

Public Methods

Method Description
Begin ( string regionName ) : void

Starts the begining of a region

Begin ( string regionName, int levelsToIncreaseIndent ) : void

Start the begining of a region, indented the numbers of levels specified

CodeRegion ( object textTransformation ) : System

Initializes an CodeRegion instance with the TextTransformation (T4 generated class) that is currently running

CodeRegion ( object textTransformation, int firstIndentLevel ) : System

Initializes an CodeRegion instance with the TextTransformation (T4 generated class) that is currently running, and the indent level to start the first region at.

End ( ) : void

Ends a region, or totaly removes it if nothing was generted since the begining of the region.

End ( int levelsToDecrease ) : void

Ends a region, or totaly removes it if nothing was generted since the begining of the region, also outdents the number of levels specified.

GetIndent ( int indentLevel ) : string

Get a string of spaces equivelent to the number of indents desired.

Method Details

Begin() public method

Starts the begining of a region
public Begin ( string regionName ) : void
regionName string
return void

Begin() public method

Start the begining of a region, indented the numbers of levels specified
public Begin ( string regionName, int levelsToIncreaseIndent ) : void
regionName string
levelsToIncreaseIndent int
return void

CodeRegion() public method

Initializes an CodeRegion instance with the TextTransformation (T4 generated class) that is currently running
public CodeRegion ( object textTransformation ) : System
textTransformation object
return System

CodeRegion() public method

Initializes an CodeRegion instance with the TextTransformation (T4 generated class) that is currently running, and the indent level to start the first region at.
public CodeRegion ( object textTransformation, int firstIndentLevel ) : System
textTransformation object
firstIndentLevel int
return System

End() public method

Ends a region, or totaly removes it if nothing was generted since the begining of the region.
public End ( ) : void
return void

End() public method

Ends a region, or totaly removes it if nothing was generted since the begining of the region, also outdents the number of levels specified.
public End ( int levelsToDecrease ) : void
levelsToDecrease int
return void

GetIndent() public static method

Get a string of spaces equivelent to the number of indents desired.
public static GetIndent ( int indentLevel ) : string
indentLevel int
return string