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