CodeFactory Platform CodeFactory Platform
CodeFactory Platform CodeFactory Platform
CodeFactory

Search Results for

    Class CsMemberExtensions

    Extension methods that support model that implement the CsMember interface.

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

    Methods

    | Improve this Doc View Source

    FormatCSharpComparisonHashCode(CsEvent, bool, bool, bool)

    Gets the hash code for a formatted event signature using the C# format.

    Declaration
    public static int FormatCSharpComparisonHashCode(this CsEvent source, bool includeSecurity = false, bool includeAttributes = false, bool includeKeywords = false)
    Parameters
    Type Name Description
    CsEvent source

    The sources CsEvent model.

    bool includeSecurity

    Optional parameter that determines to generate security in the definition. By default this is false.

    bool includeAttributes

    Optional parameter that determines if the attributes should be included in the definition. By default this is false.

    bool includeKeywords

    Optional parameter that determines if all keywords are included in the definition. By default this is false.

    Returns
    Type Description
    int

    The hash code of the formatted model.

    Exceptions
    Type Condition
    ArgumentNullException

    This is thrown if the model is null.

    | Improve this Doc View Source

    FormatCSharpComparisonHashCode(CsField, bool, bool, bool)

    Gets the hash code for a formatted field signature using the C# format.

    Declaration
    public static int FormatCSharpComparisonHashCode(this CsField source, bool includeSecurity = false, bool includeAttributes = false, bool includeKeywords = false)
    Parameters
    Type Name Description
    CsField source

    The sources CsField model.

    bool includeSecurity

    Optional parameter that determines to generate security in the definition. By default this is false.

    bool includeAttributes

    Optional parameter that determines if the attributes should be included in the definition. By default this is false.

    bool includeKeywords

    Optional parameter that determines if all keywords other then constant are included in the definition. By default this is false.

    Returns
    Type Description
    int

    The has code of the formatted field.

    Exceptions
    Type Condition
    ArgumentNullException

    This is thrown if the model is null.

    | Improve this Doc View Source

    FormatCSharpComparisonHashCode(CsMethod, bool, bool, bool)

    Gets the hash code for a formatted method signature using the C# format.

    Declaration
    public static int FormatCSharpComparisonHashCode(this CsMethod source, bool includeSecurity = false, bool includeAttributes = false, bool includeKeywords = false)
    Parameters
    Type Name Description
    CsMethod source

    The sources CsMethod model.

    bool includeSecurity

    Optional parameter that determines to generate security in the definition. By default this is false.

    bool includeAttributes

    Optional parameter that determines if the attributes should be included in the definition. By default this is false.

    bool includeKeywords

    Optional parameter that determines if all keywords are included in the definition. By default this is false.

    Returns
    Type Description
    int

    The hash code of the formatted model.

    Exceptions
    Type Condition
    ArgumentNullException

    This is thrown if the model is null.

    | Improve this Doc View Source

    FormatCSharpComparisonHashCode(CsProperty, bool, bool, bool)

    Gets the hash code for a formatted property signature using the C# format.

    Declaration
    public static int FormatCSharpComparisonHashCode(this CsProperty source, bool includeSecurity = false, bool includeAttributes = false, bool includeKeywords = false)
    Parameters
    Type Name Description
    CsProperty source

    The sources CsProperty model.

    bool includeSecurity

    Optional parameter that determines to generate security in the definition. By default this is false.

    bool includeAttributes

    Optional parameter that determines if the attributes should be included in the definition. By default this is false.

    bool includeKeywords

    Optional parameter that determines if all keywords are included in the definition. By default this is false.

    Returns
    Type Description
    int

    The hash code of the formatted model.

    Exceptions
    Type Condition
    ArgumentNullException

    This is thrown if the model is null.

    | Improve this Doc View Source

    FormatCSharpDeclarationSyntax(CsEvent, bool, bool, bool)

    Generates the syntax definition of an event in c# syntax.

    Declaration
    public static string FormatCSharpDeclarationSyntax(this CsEvent source, bool includeSecurity = true, bool includeAttributes = true, bool includeKeywords = true)
    Parameters
    Type Name Description
    CsEvent source

    The source CsEvent model to generate.

    bool includeSecurity

    Includes the security scope which was defined in the model.

    bool includeAttributes

    Includes definition of the attributes assigned to the model.

    bool includeKeywords

    Includes all keywords assigned to the source model.

    Returns
    Type Description
    string

    Fully formatted event definition or null if the event data could not be generated.

    | Improve this Doc View Source

    FormatCSharpDeclarationSyntax(CsField, bool, bool, bool)

    Generates the syntax definition of field in c# syntax. The default definition with all options turned off will return the filed signature and constants if defined and the default values.

    Declaration
    public static string FormatCSharpDeclarationSyntax(this CsField source, bool includeSecurity = true, bool includeAttributes = true, bool includeKeywords = true)
    Parameters
    Type Name Description
    CsField source

    The source ICsField model to generate.

    bool includeSecurity

    Includes the security scope which the field was defined in the model.

    bool includeAttributes

    Includes definition of the attributes assigned to the model.

    bool includeKeywords

    Includes all keywords assigned to the field from the source model.

    Returns
    Type Description
    string

    Fully formatted field definition or null if the field data could not be generated.

    | Improve this Doc View Source

    FormatCSharpDeclarationSyntax(CsMethod, bool, bool, bool)

    Generates the syntax definition of an method in c# syntax.

    Declaration
    public static string FormatCSharpDeclarationSyntax(this CsMethod source, bool includeSecurity = true, bool includeAttributes = true, bool includeKeywords = true)
    Parameters
    Type Name Description
    CsMethod source

    The source CsMethod model to generate.

    bool includeSecurity

    Includes the security scope which was defined in the model.

    bool includeAttributes

    Includes definition of the attributes assigned to the model.

    bool includeKeywords

    Includes all keywords assigned to the source model.

    Returns
    Type Description
    string

    Fully formatted event definition or null if the event data could not be generated.

    | Improve this Doc View Source

    FormatCSharpDeclarationSyntax(CsProperty, bool, bool, bool)

    Generates the syntax definition of a default no backing fields property definition in c# syntax.

    Declaration
    public static string FormatCSharpDeclarationSyntax(this CsProperty source, bool includeSecurity = true, bool includeAttributes = true, bool includeKeywords = true)
    Parameters
    Type Name Description
    CsProperty source

    The source CsProperty model to generate.

    bool includeSecurity

    Includes the security scope which the property was defined in the model.

    bool includeAttributes

    Includes definition of the attributes assigned to the model.

    bool includeKeywords

    Includes all keywords assigned to the property from the source model.

    Returns
    Type Description
    string

    Fully formatted property definition or null if the property data could not be generated.

    | Improve this Doc View Source

    FormatCSharpMemberComparisonHashCode(CsMember, MemberComparisonType)

    Gets the hash code for a formatted model signature using the C# format.

    Declaration
    public static int FormatCSharpMemberComparisonHashCode(this CsMember source, MemberComparisonType comparisonType = MemberComparisonType.Base)
    Parameters
    Type Name Description
    CsMember source

    The sources ICsModel model.

    MemberComparisonType comparisonType

    The type of comparision format to use when generating the hashcode. Default is set to the base comparision type.

    Returns
    Type Description
    int

    The has code of the formatted model.

    Exceptions
    Type Condition
    ArgumentNullException

    This is thrown if the model is null.

    | Improve this Doc View Source

    SourceMissingInterfaceMembers(ICsSource)

    Extension method that checks a CsSource model and determines if the classes and structures in the source have any missing interface members.

    Declaration
    public static IReadOnlyList<KeyValuePair<CsContainer, IReadOnlyList<CsMember>>> SourceMissingInterfaceMembers(this ICsSource source)
    Parameters
    Type Name Description
    ICsSource source

    The source implementation to validate.

    Returns
    Type Description
    IReadOnlyList<KeyValuePair<CsContainer, IReadOnlyList<CsMember>>>

    The list of missing members by target container, or an empty list if nothing is missing.

    © CodeFactory, LLC. All rights reserved.