<commit_before>using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using JoinRpg.Web.Models;
using Microsoft.AspNetCore.Mvc.TagHelpers;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.Runtime.TagHelpers;
using Microsoft.AspNetCore.Razor.TagHelpers;

namespace JoinRpg.Portal.TagHelpers
{
    // You may need to install the Microsoft.AspNetCore.Razor.Runtime package into your project
    [HtmlTargetElement("my-claim-link")]
    public class MyClaimTagHelper : AnchorTagHelper
    {
        [HtmlAttributeName("asp-for")]
        public IProjectIdAware For { get; set; }

        public override void Process(TagHelperContext context, TagHelperOutput output)
        {
            output.Attributes.Remove(output.Attributes.Single(a => a.Name == "asp-for"));
            Controller = "Claim";
            Action = "MyClaim";
            RouteValues.Add("ProjectId", For.ProjectId.ToString());
            base.Process(context, output);

        }

        public MyClaimTagHelper(IHtmlGenerator generator) : base(generator)
        {
        }
    }
}<commit_msg>Fix bug #1222: Repair MyClaimTagHelper<commit_after>using JoinRpg.Web.Models;
using Microsoft.AspNetCore.Mvc.TagHelpers;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;

namespace JoinRpg.Portal.TagHelpers
{
    [HtmlTargetElement("my-claim-link")]
    public class MyClaimTagHelper : AnchorTagHelper
    {
        [HtmlAttributeName("asp-for")]
        public IProjectIdAware For { get; set; }

        public override void Process(TagHelperContext context, TagHelperOutput output)
        {
            Controller = "Claim";
            Action = "MyClaim";
            RouteValues.Add("ProjectId", For.ProjectId.ToString());
            base.Process(context, output);
            output.TagName = "a";
        }

        public MyClaimTagHelper(IHtmlGenerator generator) : base(generator)
        {
        }
    }
}
{'fraction_non_alphanumeric': 0.1016016016016016, 'fraction_numerical': 0.002002002002002002, 'mean_word_length': 3.054766734279919, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '3011822', 'n_tokens_mistral': 523, 'n_tokens_neox': 567, 'n_words': 110}