Beispiel #1
0
        /// <summary>
        /// Creates and returns a type map definition.
        /// </summary>
        /// <param name="key">The type map definition key.</param>
        /// <returns>The generated type map definition.</returns>
        private static TypeMapDefinition CreateDefinition(TypeMapDefinitionKey key)
        {
            TypeMapDefinition definition = new TypeMapDefinition(key.SourceType, key.DestinationType);

            _storedDefinitions.Add(key, definition);

            return(definition);
        }
Beispiel #2
0
        /* ----------------------------------------------------------------------------------------------------------------------------------------- */

        #region Public Methods

        /// <summary>
        /// Creates a property type map definition.
        /// </summary>
        /// <param name="typeMapDefinition"></param>
        /// <param name="sourceProperty">The property info for the source object.</param>
        /// <param name="destinationProperty">The property info for the destination object.</param>
        /// <param name="allowNullMapping">Whether or not to allow NULL values to be mapped.</param>
        public PropertyTypeMapDefinition(TypeMapDefinition typeMapDefinition, PropertyInfo sourceProperty, PropertyInfo destinationProperty, bool allowNullMapping)
            : base(sourceProperty, destinationProperty, allowNullMapping)
        {
            _typeMapDefinition = typeMapDefinition;
        }