CodeFactory for Windows CodeFactory for Windows
CodeFactory for Windows CodeFactory for Windows
CodeFactory

Search Results for

    Class GenerateCSharpStringExtensions

    Extension methods that support the generation of source in the C# language from the name of target csharp models.

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

    Methods

    GenerateCSharpCamelCase(string)

    Formats a string as camel case.

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

    The source string to format as camel case.

    Returns
    Type Description
    string

    The formatted string.

    GenerateCSharpFormattedClassName(string, string, string)

    Formates a C# object name to be a class name with proper case formatting.

    Declaration
    public static string GenerateCSharpFormattedClassName(this string source, string prefix = null, string suffix = null)
    Parameters
    Type Name Description
    string source

    Name to be formatted.

    string prefix

    Optional parameter with the prefix to add to the name, default is null.

    string suffix

    Optional parameter with the suffix to add to the name, default is null.

    Returns
    Type Description
    string

    Formatted class name, or null if no name was provided.

    GenerateCSharpFormattedInterfaceName(string, string, string)

    Formats a C# object name to be a interface name with proper case formatting.

    Declaration
    public static string GenerateCSharpFormattedInterfaceName(this string source, string prefix = null, string suffix = null)
    Parameters
    Type Name Description
    string source

    Name to be formatted.

    string prefix

    Optional parameter with the prefix to add to the name, default is null.

    string suffix

    Optional parameter with the suffix to add to the name, default is null.

    Returns
    Type Description
    string

    Formatted class name, or null if no name was provided.

    GenerateCSharpFormattedName(string, string, string, bool, bool)

    Formats a C# object name to the target format provided.

    Declaration
    public static string GenerateCSharpFormattedName(this string source, string prefix = null, string suffix = null, bool useCamelCase = false, bool useProperCase = false)
    Parameters
    Type Name Description
    string source

    Name to be formatted.

    string prefix

    Optional parameter with the prefix to add to the name, default is null.

    string suffix

    Optional parameter with the suffix to add to the name, default is null.

    bool useCamelCase

    Optional parameter that determines if the name should follow the camel case format. Note: applied before the prefix is assigned.

    bool useProperCase

    Optional parameter that determines if the name should follow the proper case format. Note: applied before the prefix is assigned.

    Returns
    Type Description
    string

    GenerateCSharpProperCase(string)

    Formats a string as proper case.

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

    the source string to format as proper case.

    Returns
    Type Description
    string

    The formatted string.

    © CodeFactory, LLC. All rights reserved.