Search Results for

    Show / Hide Table of Contents
    View Source

    Class MapperCollection

    Represents a collection of persistence mappers responsible for mapping between database records and domain entities in Umbraco.

    Inheritance
    object
    BuilderCollectionBase<BaseMapper>
    Namespace: Umbraco.Cms.Infrastructure.Persistence.Mappers
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class MapperCollection : BuilderCollectionBase<BaseMapper>, IMapperCollection, IBuilderCollection<BaseMapper>

    Constructors

    View Source

    MapperCollection(Func<IEnumerable<BaseMapper>>)

    Initializes a new instance of the MapperCollection class with a function that provides the collection of BaseMapper instances.

    Declaration
    public MapperCollection(Func<IEnumerable<BaseMapper>> items)
    Parameters
    Type Name Description
    Func<IEnumerable<BaseMapper>> items

    A function that returns an System.Collections.Generic.IEnumerable<T> of BaseMapper objects to be included in the collection.

    Properties

    View Source

    this[Type]

    Returns a mapper for this type, throw an exception if not found

    Declaration
    public BaseMapper this[Type type] { get; }
    Parameters
    Type Name Description
    Type type
    Property Value
    Type Description
    BaseMapper

    Methods

    View Source

    TryGetMapper(Type, out BaseMapper)

    Attempts to get a mapper for the specified type.

    Declaration
    public bool TryGetMapper(Type type, out BaseMapper mapper)
    Parameters
    Type Name Description
    Type type

    The type to get the mapper for.

    BaseMapper mapper

    When this method returns, contains the mapper associated with the specified type, if found; otherwise, null.

    Returns
    Type Description
    bool

    True if a mapper for the specified type was found; otherwise, false.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX