This sample allows you to highlight C# source code. Highlighting is based on http://hilite.me web service, which is called from a background job in a truly asynchronous way – neither controller, nor any other entity is waiting for a completion. Results are delivered via WebSockets using SignalR.

All the snippets are removed every day at 12:00 AM UTC.

public class EmailSendingJob : BackgroundJob<EmailSendingArgs>
{
    private readonly IEmailSender _emailSender;

    public EmailSendingJob(IEmailSender emailSender)
    {
        _emailSender = emailSender;
    }

    public override void Execute(EmailSendingArgs args)
    {
        _emailSender.Send(
            args.EmailAddress,
            args.Subject,
            args.Body
        );
    }
}
public class EmailSendingJob : BackgroundJob<EmailSendingArgs>
{
    private readonly IEmailSender _emailSender;

    public EmailSendingJob(IEmailSender emailSender)
    {
        _emailSender = emailSender;
    }

    public override void Execute(EmailSendingArgs args)
    {
        _emailSender.Send(
            args.EmailAddress,
            args.Subject,
            args.Body
        );
    }
}
public class EmailSendingJob : BackgroundJob<EmailSendingArgs>
{
    private readonly IEmailSender _emailSender;

    public EmailSendingJob(IEmailSender emailSender)
    {
        _emailSender = emailSender;
    }

    public override void Execute(EmailSendingArgs args)
    {
        _emailSender.Send(
            args.EmailAddress,
            args.Subject,
            args.Body
        );
    }
}
public class EmailSendingJob : BackgroundJob<EmailSendingArgs>
{
    private readonly IEmailSender _emailSender;

    public EmailSendingJob(IEmailSender emailSender)
    {
        _emailSender = emailSender;
    }

    public override void Execute(EmailSendingArgs args)
    {
        _emailSender.Send(
            args.EmailAddress,
            args.Subject,
            args.Body
        );
    }
}
public class EmailSendingJob : BackgroundJob<EmailSendingArgs>
{
    private readonly IEmailSender _emailSender;

    public EmailSendingJob(IEmailSender emailSender)
    {
        _emailSender = emailSender;
    }

    public override void Execute(EmailSendingArgs args)
    {
        _emailSender.Send(
            args.EmailAddress,
            args.Subject,
            args.Body
        );
    }
}
public class EmailSendingJob : BackgroundJob<EmailSendingArgs>
{
    private readonly IEmailSender _emailSender;

    public EmailSendingJob(IEmailSender emailSender)
    {
        _emailSender = emailSender;
    }

    public override void Execute(EmailSendingArgs args)
    {
        _emailSender.Send(
            args.EmailAddress,
            args.Subject,
            args.Body
        );
    }
}
Console.WriteLine("Hello, world!");