Class CsUsingStatementExtensions
Extensions class that manage extensions that support CodeFactory models that implement the CsUsingStatement model.
Inherited Members
Namespace: CodeFactory.Formatting.CSharp
Assembly: CodeFactory.Formatting.CSharp.dll
Syntax
public static class CsUsingStatementExtensions
  Methods
| Improve this Doc View SourceCSharpFormatUsingStatement(CsUsingStatement, bool, string)
Extension method that creates a fully formatted using statement.
Declaration
public static string CSharpFormatUsingStatement(this CsUsingStatement source, bool includeAlias = true, string alias = null)
  Parameters
| Type | Name | Description | 
|---|---|---|
| CsUsingStatement | source | The source using statement to use.  | 
      
| bool | includeAlias | Optional flag that determines if a alias is included to add it to the using statement definition.  | 
      
| string | alias | Optional flag that allows you to set a custom alias. If set this will always overrider the includeAlias flag and any internal alias assigned to the model.  | 
      
Returns
| Type | Description | 
|---|---|
| string | Fully formatted using statement, or null if namespace data is missing from the model  | 
      
Examples
Format with alias using [alias] = [namespace]; Format without alias using [namespace];