Class GenerateCSharpParameterExtensions
Extension methods that support the generation of source in the C# language from the CsParameter model.
Inherited Members
Namespace: CodeFactory.WinVs.Models.CSharp
Assembly: CodeFactory.WinVs.dll
Syntax
public static class GenerateCSharpParameterExtensions
Methods
GenerateCSharpParameterDefaultValue(CsParameterDefaultValue, CsType)
Extension method that generates the default value syntax for a parameter in the C# language.
Declaration
public static string GenerateCSharpParameterDefaultValue(this CsParameterDefaultValue source, CsType type)
Parameters
Type | Name | Description |
---|---|---|
CsParameterDefaultValue | source | The target default value to format. |
CsType | type | The target type of the value to be formatted. |
Returns
Type | Description |
---|---|
string | The fully formatted syntax for the default value or null if data was missing. |
GenerateCSharpParametersSignature(IReadOnlyList<CsParameter>, NamespaceManager, List<MapNamespace>)
Extension method that create the fully formatted parameters section in c# syntax.
Declaration
public static string GenerateCSharpParametersSignature(this IReadOnlyList<CsParameter> source, NamespaceManager manager = null, List<MapNamespace> mappedNamespaces = null)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyList<CsParameter> | source | The source list of parameters to be turned into a parameters signature. |
NamespaceManager | manager | Optional parameter that contains all the using statements from the source code, when used will replace namespaces on type definition in code. |
List<MapNamespace> | mappedNamespaces | Optional parameter that provides namespaces to be mapped to. |
Returns
Type | Description |
---|---|
string | The fully formatted parameters signature or null if data was missing. |