CodeFactory Platform CodeFactory Platform
CodeFactory Platform CodeFactory Platform
CodeFactory

Search Results for

    Class CsTypeExtensions

    Extensions class that provides common automation tasks rolled up under standard extension methods that support the CsType model.

    Inheritance
    object
    CsTypeExtensions
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: CodeFactory.Formatting.CSharp
    Assembly: CodeFactory.Formatting.CSharp.dll
    Syntax
    public static class CsTypeExtensions

    Methods

    | Improve this Doc View Source

    CSharpFormatArraySignature(CsType)

    Extension method that creates the array portion definition of a type definition in C# syntax.

    Declaration
    public static string CSharpFormatArraySignature(this CsType source)
    Parameters
    Type Name Description
    CsType source

    The source type to get the array information to format.

    Returns
    Type Description
    string

    The formatted array syntax for the target type, or null if no array data was provided in the type definition.

    | Improve this Doc View Source

    CSharpFormatTupleSignature(CsType, NamespaceManager)

    Extension method that creates a C# signature for the tuple type.

    Declaration
    public static string CSharpFormatTupleSignature(this CsType source, NamespaceManager manager = null)
    Parameters
    Type Name Description
    CsType source

    The target declaration syntax for a tuple.

    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 formatted tuple or null if data is missing.

    | Improve this Doc View Source

    CSharpFormatTypeName(CsType, NamespaceManager)

    Formats a type name to match the C# syntax for a type deceleration in C#.

    Declaration
    public static string CSharpFormatTypeName(this CsType source, NamespaceManager manager = null)
    Parameters
    Type Name Description
    CsType source

    The type model to use to generate the type signature for c#

    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 formatted type definition for C#

    | Improve this Doc View Source

    CSharpFormatValueSyntax(CsType, string)

    Extension method that returns a value declaration in the C# language format.

    Declaration
    public static string CSharpFormatValueSyntax(this CsType source, string value)
    Parameters
    Type Name Description
    CsType source

    The target type to create the value definition for.

    string value

    The value to be formatted.

    Returns
    Type Description
    string

    The definition of the value formatted for C#

    © CodeFactory, LLC. All rights reserved.