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.Diagnostics; | |
using Hangfire.Client; | |
using Hangfire.Server; | |
using Hangfire.States; | |
using Hangfire.Storage; | |
namespace ActivitiesSupport | |
{ | |
public sealed class DiagnosticsActivityFilter : IClientFilter, IServerFilter, IApplyStateFilter | |
{ |
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
// Copyright © 2020 Sergey Odinokov | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of this | |
// software and associated documentation files (the “Software”), to deal in the Software | |
// without restriction, including without limitation the rights to use, copy, modify, merge, | |
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons | |
// to whom the Software is furnished to do so, subject to the following conditions: | |
// | |
// The above copyright notice and this permission notice shall be included in all copies or | |
// substantial portions of the Software. |
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()); |
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
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
// 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
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
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
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 |
NewerOlder