Class CsClassExtensions
Extensions class that manage extensions that support CodeFactory models that implement the CsClass model.
Inherited Members
Namespace: CodeFactory.Formatting.CSharp
Assembly: CodeFactory.Formatting.CSharp.dll
Syntax
public static class CsClassExtensions
Methods
| Improve this Doc View SourceCSharpFormatBaseTypeName(CsClass, NamespaceManager)
Defines the fully qualified base type name for the class model.
Declaration
public static string CSharpFormatBaseTypeName(this CsClass source, NamespaceManager manager = null)
Parameters
Type | Name | Description |
---|---|---|
CsClass | source | The source interface model to generate the type name from. |
NamespaceManager | manager | Namespace manager used to format type names.This is an optional parameter. |
Returns
Type | Description |
---|---|
string | The full type name or null if model data was missing. |
CSharpFormatDeclaration(CsClass, CsSecurity, NamespaceManager, string)
Extension method that generates a the full class declaration syntax based on the provided model.
Declaration
public static string CSharpFormatDeclaration(this CsClass source, CsSecurity security, NamespaceManager manager = null, string className = null)
Parameters
Type | Name | Description |
---|---|---|
CsClass | source | The source class model to format. |
CsSecurity | security | The security level the class should be implemented as. |
NamespaceManager | manager | Namespace manager used to format type names.This is an optional parameter. |
string | className | Optional parameter that allows you to specify a new name for the class. |
Returns
Type | Description |
---|---|
string | The full class declaration or null if model data was missing. |
Examples
Format with no generics [security] class [name] [:[base class*], [inherited interfaces*]] Format with generics [security] class [name] <[generic parameters]> [: [base class*], [inherited interfaces*]] [Generic Where Clauses*]