Org.SourceFlow.CSharp
Class CSharpFile
IComparable
|
+--CodeElement
|
+--CodeContainer
|
+--CodeFile
|
+--CSharpFile
in CSharpFile.cs
- public class CSharpFile
- extends CodeFile
A class generating a C# source code file.
|
Field Summary |
override int |
Category
Returns a numeric category number for the code element. |
override string |
Name
Returns the file name. |
|
Constructor Summary |
CSharpFile( DirectoryInfo basedir, string basename )
Creates a new C# source code file. |
Category
public override int Category;
-
Returns a numeric category number for the code element. A
lower category number implies that the code element should
be placed before code elements with a higher category
number within a declaration.
- Returns:
- the category number
Name
public override string Name;
-
Returns the file name.
- Returns:
- the file name.
CSharpFile
public CSharpFile( DirectoryInfo basedir, string basename );
-
Creates a new C# source code file.
- Parameters:
basedir - the base output directory
basename - the base file name (without extension)
AddClass
public void AddClass( CSharpClass c );
-
Adds a class declaration to the file.
- Parameters:
c - the class declaration to add
AddComment
public void AddComment( CSharpComment comment );
-
Adds a file comment.
- Parameters:
comment - the file comment to add
AddEnumeration
public void AddEnumeration( CSharpEnumeration e );
-
Adds an enumeration declaration to the file.
- Parameters:
e - the enumeration to add
AddNamespace
public void AddNamespace( CSharpNamespace n );
-
Adds a namespace declaration to the file.
- Parameters:
n - the namespace declaration to add
AddUsing
public void AddUsing( CSharpUsing u );
-
Adds a using declaration to the file.
- Parameters:
u - the using declaration to add
Print
public override void Print( StreamWriter output, CodeStyle style, int indent );
-
Prints the file contents to the specified output stream.
- Parameters:
output - the output stream
style - the code style to use
indent - the indentation level