コード例 #1
0
        /// <summary>
        /// Allows the map visitor to execute mapping for complex type properties of the DTO.
        /// </summary>
        /// <param name="visitor">The map visitor.</param>
        public void Accept(DtoMapVisitor <TDto, TEntity> visitor)
        {
            if (visitor == null)
            {
                throw new ArgumentNullException(nameof(visitor));
            }

            if ((MappingDepth & MappingDepth.Root) == MappingDepth.Root || (MappingDepth & MappingDepth.Complex) == MappingDepth.Complex)
            {
                visitor.Visit(this);
            }
        }
コード例 #2
0
        /// <summary>
        /// Allows the map visitor to execute mapping for primitive type properties of the DTO.
        /// </summary>
        /// <param name="visitor">The map visitor.</param>
        public override void Accept(DtoMapVisitor <TDto, TEntity> visitor)
        {
            if (visitor == null)
            {
                throw new ArgumentNullException(nameof(visitor));
            }

            if ((MappingDepth & MappingDepth.Root) == MappingDepth.Root || (MappingDepth & MappingDepth.Primitives) == MappingDepth.Primitives)
            {
                visitor.Visit(this);
            }
        }