Hangfire:是否可以将超链接注入DisplayName属性?

时间:2019-05-31 12:10:38

标签: c# asp.net-mvc hyperlink hangfire

布雷克·康纳利(Blake Connally)制造了a compelling case for Hangfire

我实现了他的演示代码,并想知道:

  • 是否可以将超链接插入DisplayName属性中?

namespace HangfireDemo.Core.Demo
{
    public interface IDemoService
    {
        void RunDemoTask(PerformContext context);
    }

    public class DemoService : IDemoService
    {
        [DisplayName("Data Gathering Task <a href=\"jira.contoso.com\">Confluence Page</a>")]
        public void RunDemoTask(PerformContext context)
        {
            Console.WriteLine("This is a task that ran from the demo service.");
            BackgroundJob.ContinueJobWith(context.BackgroundJob.Id, () => NextJob());
        }

        public void NextJob()
        {
            Console.WriteLine("This is my next task.");
        }
    }
}

Example of a Link Inside of a Hangfire Dashboard

0 个答案:

没有答案