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.IO; | |
using Elsa.Persistence.EntityFramework.Core.Extensions; | |
using Elsa.Providers.Workflows; | |
using Elsa.Server.Hangfire.Extensions; | |
using Microsoft.EntityFrameworkCore; | |
using Microsoft.Extensions.DependencyInjection; | |
using Storage.Net; | |
namespace DocumentManagement.Workflows.Extensions |
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
class MyJob : IWorkflow | |
{ | |
public void Build(IWorkflowBuilder workflow) | |
{ | |
workflow | |
.Cron("* * * * * * *") | |
.WriteLine(() => $"CRON event at {DateTime.Now}"); | |
} | |
} |
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; | |
using System.Threading.Tasks; | |
using Elsa.Scripting.JavaScript.Events; | |
using Elsa.Scripting.JavaScript.Messages; | |
using MediatR; | |
using Microsoft.AspNetCore.StaticFiles; | |
namespace DocumentManagement.Workflows.Scripting.JavaScript | |
{ |
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.Threading.Tasks; | |
using DocumentManagement.Core.Models; | |
using DocumentManagement.Core.Services; | |
using Elsa.ActivityResults; | |
using Elsa.Attributes; | |
using Elsa.Expressions; | |
using Elsa.Providers.WorkflowStorage; | |
using Elsa.Services; | |
using Elsa.Services.Models; |
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.Threading; | |
using System.Threading.Tasks; | |
using DocumentManagement.Core.Events; | |
using Elsa.Models; | |
using Elsa.Services; | |
using MediatR; | |
using Open.Linq.AsyncExtensions; | |
namespace DocumentManagement.Workflows.Handlers | |
{ |
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 DocumentManagement.Core.Options; | |
using DocumentManagement.Core.Services; | |
using Microsoft.Extensions.DependencyInjection; | |
using Storage.Net; | |
namespace DocumentManagement.Core.Extensions | |
{ | |
public static class ServiceCollectionExtensions | |
{ | |
public static IServiceCollection AddDomainServices(this IServiceCollection services) |
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 DocumentManagement.Workflows.Extensions; | |
using Elsa.Activities.Email.Options; | |
using Elsa.Activities.Http.Options; | |
using Elsa.Persistence.EntityFramework.Sqlite; | |
using Elsa.Server.Hangfire.Extensions; | |
using Hangfire; | |
using Hangfire.SQLite; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.Extensions.Configuration; |
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 AuthenticatingHandler<T> : DelegatingHandler where T : ISecurityTokenAccessor | |
{ | |
private readonly Policy<HttpResponseMessage> _policy; | |
private readonly T _securityTokenAccessor; | |
private IAccessToken _accessToken; | |
private AuthenticationHeaderValue _authenticationHeader; | |
public AuthenticatingHandler(T securityTokenAccessor) | |
{ | |
_securityTokenAccessor = securityTokenAccessor; |
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.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Elsa.Models; | |
using Elsa.Serialization; | |
using Elsa.Services; | |
using Microsoft.Extensions.Configuration; |
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
class ThisIsMyMonday : IWorkflow | |
{ | |
private ITrashCleanupService _cleanupService; | |
private IDogWalkingService _dogWalkingService; | |
private IDishCleaningService _dishCleaningService; | |
public CleanTrash(ITrashCleanupService cleanupService, IDogWalkingService dogWalkingService, IDishCleaningService dishCleaningService) | |
{ | |
_cleanupService = cleanupService; | |
_dogWalkingService = dogWalkingService; |
NewerOlder