This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading.Tasks; | |
using ConsoleSample; | |
using Hangfire; | |
using Hangfire.Logging; | |
using Hangfire.Pro.Redis; | |
using Microsoft.Owin; | |
using Microsoft.Owin.Hosting; | |
using Owin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Web; | |
using System.Web.Helpers; | |
using System.Web.Mvc; | |
using Hangfire.Dashboard.Owin; | |
namespace WebApplication34 | |
{ | |
public class MvcAntiforgery : IOwinDashboardAntiforgery |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading.Tasks; | |
using Hangfire; | |
using Hangfire.Common; | |
using Hangfire.States; | |
using Hangfire.Storage; | |
using Microsoft.Owin.Hosting; | |
using Owin; | |
namespace ConsoleApp71 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using Hangfire; | |
using Hangfire.Batches.Client; | |
using Hangfire.Client; | |
using Hangfire.Storage; | |
using Moq; | |
using Xunit; | |
namespace ClassLibrary1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using Hangfire; | |
using Hangfire.Batches.Client; | |
using Hangfire.Client; | |
using Hangfire.Storage; | |
using Moq; | |
using Xunit; | |
namespace ClassLibrary1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyAutofacActivator : JobActivator | |
{ | |
private readonly ILifetimeScope _lifetimeScope; | |
public MyAutofacActivator(ILifetimeScope lifetimeScope) | |
{ | |
_lifetimeScope = lifetimeScope; | |
} | |
public override JobActivatorScope BeginScope(JobActivatorContext context) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file is part of Hangfire. | |
// Copyright © 2017 Sergey Odinokov. | |
// | |
// Hangfire is free software: you can redistribute it and/or modify | |
// it under the terms of the GNU Lesser General Public License as | |
// published by the Free Software Foundation, either version 3 | |
// of the License, or any later version. | |
// | |
// Hangfire is distributed in the hope that it will be useful, | |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Web.Mvc; | |
using Hangfire; | |
namespace MyApplication | |
{ | |
public class HomeController : Controller | |
{ | |
private readonly IBackgroundJobClient _backgroundJobs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq.Expressions; | |
using Hangfire.Annotations; | |
using Hangfire.Common; | |
using Hangfire.States; | |
namespace Hangfire | |
{ | |
public static class RecurringJobManagerExtensions | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GlobalConfiguration.Configuration | |
.UseFilter(new OverrideJobIdFilter()); | |
OverrideJobIdFilter.SetOverriddenId(Guid.Parse("266AC580-4FF9-4E72-B06A-CA20D7664B9E")); | |
BackgroundJob.Enqueue(() => Empty()); |