Show / Hide Table of Contents

    Class FieldGeneratorExtensions

    Extension methods for IFieldGenerator.

    Inheritance
    System.Object
    FieldGeneratorExtensions
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: ChameleonForms.FieldGenerators
    Assembly: ChameleonForms.dll
    Syntax
    public static class FieldGeneratorExtensions

    Fields

    | Improve this Doc View Source

    FloatingTypes

    List of floating-pint types.

    Declaration
    public static readonly HashSet<Type> FloatingTypes
    Field Value
    Type Description
    System.Collections.Generic.HashSet<System.Type>
    | Improve this Doc View Source

    IntTypes

    List of integral types.

    Declaration
    public static readonly HashSet<Type> IntTypes
    Field Value
    Type Description
    System.Collections.Generic.HashSet<System.Type>
    | Improve this Doc View Source

    NumericTypes

    List of all numeric types.

    Declaration
    public static readonly HashSet<Type> NumericTypes
    Field Value
    Type Description
    System.Collections.Generic.HashSet<System.Type>

    Methods

    | Improve this Doc View Source

    GetEnumerableValues<TModel, T>(IFieldGenerator<TModel, T>)

    Returns the enumerated values of a field that is an System.Collections.Generic.IEnumerable<T>.

    Declaration
    public static IEnumerable<object> GetEnumerableValues<TModel, T>(this IFieldGenerator<TModel, T> fieldGenerator)
    Parameters
    Type Name Description
    IFieldGenerator<TModel, T> fieldGenerator

    The field generator wrapping the field

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<System.Object>

    The enumerated values of the field

    Type Parameters
    Name Description
    TModel
    T
    | Improve this Doc View Source

    GetUnderlyingType<TModel, T>(IFieldGenerator<TModel, T>)

    Returns the underlying type of the field - unwrapping System.Nullable<T> and System.Collections.Generic.IEnumerable<T> and IEnumerable<Nullable<T>>.

    Declaration
    public static Type GetUnderlyingType<TModel, T>(this IFieldGenerator<TModel, T> fieldGenerator)
    Parameters
    Type Name Description
    IFieldGenerator<TModel, T> fieldGenerator

    The field generator wrapping the field

    Returns
    Type Description
    System.Type

    The underlying type of the field

    Type Parameters
    Name Description
    TModel
    T
    | Improve this Doc View Source

    HasEnumerableValues<TModel, T>(IFieldGenerator<TModel, T>)

    Whether or not the field represented by the field generator is an enumerable list that allows multiple values. i.e. whether or not the field is an System.Collections.Generic.IEnumerable<T>

    Declaration
    public static bool HasEnumerableValues<TModel, T>(this IFieldGenerator<TModel, T> fieldGenerator)
    Parameters
    Type Name Description
    IFieldGenerator<TModel, T> fieldGenerator
    Returns
    Type Description
    System.Boolean

    Whether or not the field is an System.Collections.Generic.IEnumerable<T>

    Type Parameters
    Name Description
    TModel
    T
    | Improve this Doc View Source

    HasMultipleEnumValues<TModel, T>(IFieldGenerator<TModel, T>)

    Whether or not the field represented by the field generator is an enum that can represent multiple values. i.e. whether or not the field is a flags enum.

    Declaration
    public static bool HasMultipleEnumValues<TModel, T>(this IFieldGenerator<TModel, T> fieldGenerator)
    Parameters
    Type Name Description
    IFieldGenerator<TModel, T> fieldGenerator
    Returns
    Type Description
    System.Boolean

    Whether or not the field is a flags enum

    Type Parameters
    Name Description
    TModel
    T
    | Improve this Doc View Source

    HasMultipleValues<TModel, T>(IFieldGenerator<TModel, T>)

    Whether or not the field represented by the field generator allows the user to enter multiple values.

    Declaration
    public static bool HasMultipleValues<TModel, T>(this IFieldGenerator<TModel, T> fieldGenerator)
    Parameters
    Type Name Description
    IFieldGenerator<TModel, T> fieldGenerator
    Returns
    Type Description
    System.Boolean

    Whether or not the user can enter multiple values

    Type Parameters
    Name Description
    TModel
    T
    | Improve this Doc View Source

    IsFloatingNumber<TModel, T>(IFieldGenerator<TModel, T>)

    Whether or not the field involves collection of floating-point number values.

    Declaration
    public static bool IsFloatingNumber<TModel, T>(this IFieldGenerator<TModel, T> fieldGenerator)
    Parameters
    Type Name Description
    IFieldGenerator<TModel, T> fieldGenerator

    The field generator wrapping the field

    Returns
    Type Description
    System.Boolean

    Whether or not the field involves collection of floating-point number values

    Type Parameters
    Name Description
    TModel
    T
    | Improve this Doc View Source

    IsIntegralNumber<TModel, T>(IFieldGenerator<TModel, T>)

    Whether or not the field involves collection of integral number values.

    Declaration
    public static bool IsIntegralNumber<TModel, T>(this IFieldGenerator<TModel, T> fieldGenerator)
    Parameters
    Type Name Description
    IFieldGenerator<TModel, T> fieldGenerator

    The field generator wrapping the field

    Returns
    Type Description
    System.Boolean

    Whether or not the field involves collection of integral number values

    Type Parameters
    Name Description
    TModel
    T
    | Improve this Doc View Source

    IsNumeric<TModel, T>(IFieldGenerator<TModel, T>)

    Whether or not the field involves collection of numeric values.

    Declaration
    public static bool IsNumeric<TModel, T>(this IFieldGenerator<TModel, T> fieldGenerator)
    Parameters
    Type Name Description
    IFieldGenerator<TModel, T> fieldGenerator

    The field generator wrapping the field

    Returns
    Type Description
    System.Boolean

    Whether or not the field involves collection of numeric values

    Type Parameters
    Name Description
    TModel
    T
    | Improve this Doc View Source

    IsSelected<TModel, T>(IFieldGenerator<TModel, T>, Object)

    Whether or not the given value is present for the field represented by the field generator.

    Declaration
    public static bool IsSelected<TModel, T>(this IFieldGenerator<TModel, T> fieldGenerator, object value)
    Parameters
    Type Name Description
    IFieldGenerator<TModel, T> fieldGenerator

    The field generator wrapping the field

    System.Object value

    The value to check is selected

    Returns
    Type Description
    System.Boolean

    Whether or not the value is selected

    Type Parameters
    Name Description
    TModel
    T
    • Improve this Doc
    • View Source
    Back to top © Copyright 2012-2020 MRCollective, Rob Moore, Matt Davies and the contributors to ChameleonForms.