Innovt Platform
Search Results for

    Show / Hide Table of Contents

    Class SimpleMapper

    Provides simple object mapping functionality between two objects of different types.

    Inheritance
    object
    SimpleMapper
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Innovt.Core.Utilities.Mapper
    Assembly: Innovt.Core.dll
    Syntax
    public static class SimpleMapper

    Methods

    | Edit this page View Source

    MapToList<T1>(IEnumerable<object>)

    Extension method to map object list to another object list

    Declaration
    public static IList<T1> MapToList<T1>(this IEnumerable<object> inputInstance) where T1 : class
    Parameters
    Type Name Description
    IEnumerable<object> inputInstance

    The list that you want to convert.

    Returns
    Type Description
    IList<T1>
    Type Parameters
    Name Description
    T1

    The final type

    | Edit this page View Source

    MapTo<T1>(object)

    Extension method to map object to another object

    Declaration
    public static T1 MapTo<T1>(this object inputInstance) where T1 : class
    Parameters
    Type Name Description
    object inputInstance

    The instance that you want to map

    Returns
    Type Description
    T1
    Type Parameters
    Name Description
    T1

    The final type

    | Edit this page View Source

    Map<T1, T2>(T1)

    Maps the properties from the input object to a new instance of the output object type.

    Declaration
    public static T2 Map<T1, T2>(T1 input) where T1 : class where T2 : class
    Parameters
    Type Name Description
    T1 input

    The input object to map from.

    Returns
    Type Description
    T2

    A new instance of the output object type with properties mapped from the input object.

    Type Parameters
    Name Description
    T1

    The type of the input object.

    T2

    The type of the output object.

    | Edit this page View Source

    Map<T1, T2>(T1, T2)

    Maps the properties from the input object to the provided output object instance.

    Declaration
    public static void Map<T1, T2>(T1 inputInstance, T2 outputInstance) where T1 : class where T2 : class
    Parameters
    Type Name Description
    T1 inputInstance

    The input object to map from.

    T2 outputInstance

    The output object to map to.

    Type Parameters
    Name Description
    T1

    The type of the input object.

    T2

    The type of the output object.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX