Bosphorus.Dao.Common.Mapper.Core.CompositeMapper.Map C# (CSharp) Method

Map() public method

public Map ( Type sourceType, object source, Type targetType, object target ) : void
sourceType System.Type
source object
targetType System.Type
target object
return void
        public void Map(Type sourceType, object source, Type targetType, object target)
        {
            foreach (IMapper item in items)
            {
                bool isApplicable = item.IsApplicable(sourceType, targetType);
                if (!isApplicable)
                {
                    continue;
                }

                item.Map(sourceType, source, targetType, target);
                return;;
            }

            //TODO: Throw exception
        }
    }