Search Results for

    Show / Hide Table of Contents
    View Source

    Class MapperContext

    Represents a mapper context.

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Mapping
    Assembly: Umbraco.Core.dll
    Syntax
    public class MapperContext

    Constructors

    View Source

    MapperContext(IUmbracoMapper)

    Initializes a new instance of the MapperContext class.

    Declaration
    public MapperContext(IUmbracoMapper mapper)
    Parameters
    Type Name Description
    IUmbracoMapper mapper

    Properties

    View Source

    HasItems

    Gets a value indicating whether the context has items.

    Declaration
    public bool HasItems { get; }
    Property Value
    Type Description
    System.Boolean
    View Source

    Items

    Gets the context items.

    Declaration
    public IDictionary<string, object> Items { get; }
    Property Value
    Type Description
    IDictionary<System.String, System.Object>

    Methods

    View Source

    Map<TTarget>(Object)

    Maps a source object to a new target object.

    Declaration
    public TTarget Map<TTarget>(object source)
    Parameters
    Type Name Description
    System.Object source

    The source object.

    Returns
    Type Description
    TTarget

    The target object.

    Type Parameters
    Name Description
    TTarget

    The target type.

    View Source

    Map<TSource, TTarget>(TSource)

    Maps a source object to a new target object.

    Declaration
    public TTarget Map<TSource, TTarget>(TSource source)
    Parameters
    Type Name Description
    TSource source

    The source object.

    Returns
    Type Description
    TTarget

    The target object.

    Type Parameters
    Name Description
    TSource

    The source type.

    TTarget

    The target type.

    View Source

    Map<TSource, TTarget>(TSource, TTarget)

    Maps a source object to an existing target object.

    Declaration
    public TTarget Map<TSource, TTarget>(TSource source, TTarget target)
    Parameters
    Type Name Description
    TSource source

    The source object.

    TTarget target

    The target object.

    Returns
    Type Description
    TTarget

    The target object.

    Type Parameters
    Name Description
    TSource

    The source type.

    TTarget

    The target type.

    View Source

    MapEnumerable<TSourceElement, TTargetElement>(IEnumerable<TSourceElement>)

    Maps an enumerable of source objects to a new list of target objects.

    Declaration
    public List<TTargetElement> MapEnumerable<TSourceElement, TTargetElement>(IEnumerable<TSourceElement> source)
    Parameters
    Type Name Description
    IEnumerable<TSourceElement> source

    The source objects.

    Returns
    Type Description
    List<TTargetElement>

    A list containing the target objects.

    Type Parameters
    Name Description
    TSourceElement

    The type of the source objects.

    TTargetElement

    The type of the target objects.

    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • MapperContext(IUmbracoMapper)
    • Properties
      • HasItems
      • Items
    • Methods
      • Map<TTarget>(Object)
      • Map<TSource, TTarget>(TSource)
      • Map<TSource, TTarget>(TSource, TTarget)
      • MapEnumerable<TSourceElement, TTargetElement>(IEnumerable<TSourceElement>)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX