<commit_before>﻿using System;
using Our.Umbraco.Ditto.Attributes;
using Our.Umbraco.Ditto.ComponentModel;
using Our.Umbraco.Ditto.ComponentModel.ConversionHandlers;
using Umbraco.Core.Models;
using Umbraco.Web;

namespace Our.Umbraco.Ditto.Tests.Models
{
    [DittoConversionHandler(typeof(CalculatedModelOnConvertedHandler))]
    public class CalculatedModel : BaseCalculatedModel
    {
        public string Name { get; set; }

        [DittoIgnore]
        public string AltText2 { get; set; }

        [DittoOnConverted]
        internal void CalculatedModel_OnConverted(ConversionHandlerContext ctx)
        {
            Name = "Test";
        }
    }

    public class BaseCalculatedModel
    {
        [DittoIgnore]
        public string AltText { get; set; }

        [DittoOnConverting]
        internal void BaseCalculatedModel_OnConverting(ConversionHandlerContext ctx)
        {
            AltText = ctx.Content.GetPropertyValue("prop1") + " " +
                ctx.Content.GetPropertyValue("prop2");
        }
    }

    public class CalculatedModelOnConvertedHandler : DittoConversionHandler<CalculatedModel>
    {
        public CalculatedModelOnConvertedHandler(ConversionHandlerContext ctx) 
            : base(ctx)
        { }

        public override void OnConverted()
        {
            Model.AltText2 = Content.GetPropertyValue("prop1") + " " +
                Content.GetPropertyValue("prop2");
        }
    }
}<commit_msg>Renamed CalculatedModelOnConvertedHandler to CalculatedModelConversionHandler<commit_after>﻿using System;
using Our.Umbraco.Ditto.Attributes;
using Our.Umbraco.Ditto.ComponentModel;
using Our.Umbraco.Ditto.ComponentModel.ConversionHandlers;
using Umbraco.Core.Models;
using Umbraco.Web;

namespace Our.Umbraco.Ditto.Tests.Models
{
    [DittoConversionHandler(typeof(CalculatedModelConversionHandler))]
    public class CalculatedModel : BaseCalculatedModel
    {
        public string Name { get; set; }

        [DittoIgnore]
        public string AltText2 { get; set; }

        [DittoOnConverted]
        internal void CalculatedModel_OnConverted(ConversionHandlerContext ctx)
        {
            Name = "Test";
        }
    }

    public class BaseCalculatedModel
    {
        [DittoIgnore]
        public string AltText { get; set; }

        [DittoOnConverting]
        internal void BaseCalculatedModel_OnConverting(ConversionHandlerContext ctx)
        {
            AltText = ctx.Content.GetPropertyValue("prop1") + " " +
                ctx.Content.GetPropertyValue("prop2");
        }
    }

    public class CalculatedModelConversionHandler : DittoConversionHandler<CalculatedModel>
    {
        public CalculatedModelConversionHandler(ConversionHandlerContext ctx) 
            : base(ctx)
        { }

        public override void OnConverted()
        {
            Model.AltText2 = Content.GetPropertyValue("prop1") + " " +
                Content.GetPropertyValue("prop2");
        }
    }
}
{'fraction_non_alphanumeric': 0.08296795952782463, 'fraction_numerical': 0.004047217537942664, 'mean_word_length': 2.689054726368159, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '824011', 'n_tokens_mistral': 874, 'n_tokens_neox': 825, 'n_words': 141}