Org.SourceFlow.CSharp
Class CSharpUsing
IComparable
|
+--CodeElement
|
+--CSharpUsing
in CSharpUsing.cs
- public class CSharpUsing
- extends CodeElement
A class generating a C# using declaration.
|
Field Summary |
override int |
Category
Returns a numeric category number for the code element. |
|
Constructor Summary |
CSharpUsing( string name )
Creates a new C# using declaration. |
|
Method Summary |
override int |
CompareTo( object obj )
Compares this object to another one. |
override bool |
Equals( object obj )
Returns true if this object is equal to another. |
override void |
Print( StreamWriter output, CodeStyle style, int indent )
Prints the code element to the specified output stream. |
protected internal override void |
PrintSeparator( StreamWriter output, CodeElement prev )
Prints a separator line between this element and the
previous element in a container. |
override string |
ToString()
Returns the namespace to use. |
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
CSharpUsing
public CSharpUsing( string name );
-
Creates a new C# using declaration.
- Parameters:
name - the namespace being used
CompareTo
public override int CompareTo( object obj );
-
Compares this object to another one. The comparison is
based primarily on the code element category, and
secondarily on the namespace.
- Parameters:
obj - the object to compare to
- Returns:
- negative if this object preceeds the other one,
zero (0) if the objects are equal, or
positive if this object succeeds the other one
Equals
public override bool Equals( object obj );
-
Returns true if this object is equal to another.
- Parameters:
obj - the object to compare to
- Returns:
- true if the objects are equal, or
false otherwise
Print
public override void Print( StreamWriter output, CodeStyle style, int indent );
-
Prints the code element to the specified output stream.
- Parameters:
output - the output stream
style - the code style to use
indent - the indentation level
PrintSeparator
protected internal override void PrintSeparator( StreamWriter output, CodeElement prev );
-
Prints a separator line between this element and the
previous element in a container. This method will NOT be
called for the first element in a container, as it has no
previous element. This method prints a single newline only
if the category numbers differ.
- Parameters:
output - the output stream
prev - the previous code element
ToString
public override string ToString();
-
Returns the namespace to use.
- Returns:
- the namespace to use