<commit_before>﻿using Photosphere.Mapping.Static;

namespace Photosphere.Mapping.Extensions
{
    public static class MappingObjectExtensions
    {
        /// <summary> Map from source to existent object target</summary>
        public static void MapTo<TSource, TTarget>(this TSource source, TTarget target)
            where TTarget : class, new()
        {
            StaticMapper<TSource, TTarget>.Map(source, target);
        }

        /// <summary> Map from source to new object of TTarget</summary>
        public static TTarget Map<TSource, TTarget>(this TSource source)
            where TTarget : class, new()
        {
            return StaticMapper<TSource, TTarget>.Map(source);
        }

        /// <summary> Map from object source to existent object target</summary>
        public static void MapToObject(this object source, object target)
        {
            StaticMapper.Map(source, target);
        }

        /// <summary> Map from object source to new object of TTarget</summary>
        public static TTarget MapObject<TTarget>(this object source)
            where TTarget : new()
        {
            return StaticMapper.Map<TTarget>(source);
        }
    }
}<commit_msg>Make beauty to extensions API<commit_after>﻿using Photosphere.Mapping.Static;

namespace Photosphere.Mapping.Extensions
{
    public static class MappingObjectExtensions
    {
        /// <summary> Map from source to existent object target</summary>
        public static void MapTo<TSource, TTarget>(this TSource source, TTarget target)
            where TTarget : class, new()
        {
            StaticMapper<TSource, TTarget>.Map(source, target);
        }

        /// <summary> Map from object source to existent object target</summary>
        public static void MapToObject(this object source, object target)
        {
            StaticMapper.Map(source, target);
        }

        /// <summary> Map from source to new object of TTarget</summary>
        public static TTarget Map<TSource, TTarget>(this TSource source)
            where TTarget : class, new()
        {
            return StaticMapper<TSource, TTarget>.Map(source);
        }

        /// <summary> Map from object source to new object of TTarget</summary>
        public static TTarget MapObject<TTarget>(this object source)
            where TTarget : new()
        {
            return StaticMapper.Map<TTarget>(source);
        }
    }
}
{'fraction_non_alphanumeric': 0.08903544929925804, 'fraction_numerical': 0.0, 'mean_word_length': 2.3020408163265307, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6742319', 'n_tokens_mistral': 623, 'n_tokens_neox': 603, 'n_words': 194}