Class CsGenericParameterExtensions
Extensions class that provides common automation tasks rolled up under standard extension methods that support the CsGenericParameter model.
Inherited Members
Namespace: CodeFactory.Formatting.CSharp
Assembly: CodeFactory.Formatting.CSharp.dll
Syntax
public static class CsGenericParameterExtensionsMethods
| Improve this Doc View SourceCSharpFormatGenericParametersSignature(IReadOnlyList<CsGenericParameter>, NamespaceManager)
Extension method that generates the generics definition part of a signature in the C# format.
Declaration
public static string CSharpFormatGenericParametersSignature(this IReadOnlyList<CsGenericParameter> source, NamespaceManager manager = null)Parameters
| Type | Name | Description | 
|---|---|---|
| IReadOnlyList<CsGenericParameter> | source | The target types that make up the generics 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. | 
Returns
| Type | Description | 
|---|---|
| string | The fully formatted definition of the generics signature, or null if the source is not provided. | 
CSharpFormatGenericWhereClauseSignature(CsGenericParameter, NamespaceManager)
Extension method that generates the where clause for a generic parameter if one exists. This will not generate if the generic parameter is not a place holder type, or if no where clause conditions have been provided.
Declaration
public static string CSharpFormatGenericWhereClauseSignature(this CsGenericParameter source, NamespaceManager manager = null)Parameters
| Type | Name | Description | 
|---|---|---|
| CsGenericParameter | source | Generic parameter to generate the where clause from. | 
| NamespaceManager | manager | Optional parameter that contains all the using statements from the source code, when used will replace namespaces on type definition in code. | 
Returns
| Type | Description | 
|---|---|
| string | Null if the where clause was not generated, or the C# syntax for the where clause. | 
