Org.SourceFlow.CSharp
Class CSharpType
IComparable
|
+--CodeElement
|
+--CodeContainer
|
+--CSharpType
in CSharpType.cs
- Direct Known Subclasses:
- CSharpClass, CSharpEnumeration
- public abstract class CSharpType
- extends CodeContainer
An abstract superclass for the various C# type code generators.
|
Constructor Summary |
protected |
internal CSharpType( int modifiers, string name, string extendType )
Creates a new type code generator with the specified access
modifier that extends a specified type. |
protected |
internal CSharpType( int modifiers, string name, string[] extendTypes )
Creates a new type code generator with the specified access
modifier that extends a specified type. |
|
Method Summary |
void |
AddComment( CSharpComment comment )
Sets the type comment. |
protected internal void |
Print( StreamWriter output, CodeStyle style, int indent, string type, bool compact )
Prints the type to the specified stream. |
override string |
ToString()
Returns the type name. |
CSharpType
protected internal CSharpType( int modifiers, string name, string extendType );
-
Creates a new type code generator with the specified access
modifier that extends a specified type. If the extend type
null or "" is specified, no extends declaration will be
printed.
- Parameters:
modifiers - the modifier flag constants
name - the type name
extendType - the type to extend and/or implement
CSharpType
protected internal CSharpType( int modifiers, string name, string[] extendTypes );
-
Creates a new type code generator with the specified access
modifier that extends a specified type.
- Parameters:
modifiers - the modifier flag constants
name - the type name
extendTypes - the types to extend and/or implement
AddComment
public void AddComment( CSharpComment comment );
-
Sets the type comment. This method will remove any previous
type comment.
- Parameters:
comment - the new type comment
Print
protected internal void Print( StreamWriter output, CodeStyle style, int indent, string type, bool compact );
-
Prints the type to the specified stream.
- Parameters:
output - the output stream
style - the code style to use
indent - the indentation level
type - the type name
compact - the compact printing flag
ToString
public override string ToString();
-
Returns the type name.
- Returns:
- the type name