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 CleanTrash : IWorkflow | |
{ | |
private ITrashCleanupService _cleanupService; | |
public CleanTrash(ITrashCleanupService cleanupService) | |
{ | |
_cleanupService = cleanupService; | |
} | |
public void Build(IWorkflowBuilder workflow) |
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
services.AddQuartz(quartz => | |
{ | |
quartz.AddJob<MyJob>(j => j.WithIdentity("MyJob")); | |
quartz.AddTrigger(t => t | |
.ForJob("MyJob") | |
.StartNow() | |
.WithCronSchedule("* * * * * * *")); | |
}); |
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
// Do some work every minute. | |
protected override async Task ExecuteAsync(CancellationToken stoppingToken) | |
{ | |
while(!stoppingToken.IsCancellationRequested) | |
{ | |
// Do work. | |
// Wait for a minute. | |
await Task.Delay(TimeSpan.FromMinutes(1), stoppingToken); | |
} |
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.Models; | |
using Elsa.Services; | |
using Elsa.Services.Models; | |
using Microsoft.Extensions.DependencyInjection; | |
namespace Sample | |
{ |
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
@page "/" | |
<div class="form-signup"> | |
<EditForm Model="@RegistrationModel" OnValidSubmit="@HandleFormSubmission" hidden="@ShowConfirmation"> | |
<h1 class="h3 mb-3 font-weight-normal">Please register</h1> | |
<DataAnnotationsValidator/> | |
<ValidationSummary/> |
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 Elsa.Attributes; | |
using Elsa.Expressions; | |
using Elsa.Results; | |
using Elsa.Samples.UserRegistration.Web.Models; | |
using Elsa.Services; | |
using Elsa.Services.Models; | |
using MongoDB.Driver; |
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 Elsa.Attributes; | |
using Elsa.Expressions; | |
using Elsa.Results; | |
using Elsa.Samples.UserRegistration.Web.Models; | |
using Elsa.Services; | |
using Elsa.Services.Models; | |
using MongoDB.Driver; | |
using MongoDB.Driver.Linq; |
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 Elsa.Attributes; | |
using Elsa.Expressions; | |
using Elsa.Extensions; | |
using Elsa.Results; | |
using Elsa.Samples.UserRegistration.Web.Models; | |
using Elsa.Samples.UserRegistration.Web.Services; | |
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 Elsa.Samples.UserRegistration.Web.Activities; | |
using Microsoft.Extensions.DependencyInjection; | |
namespace Elsa.Samples.UserRegistration.Web.Extensions | |
{ | |
public static class UserServiceCollectionExtensions | |
{ | |
public static IServiceCollection AddUserActivities(this IServiceCollection services) | |
{ | |
return 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 System.Threading; | |
using System.Threading.Tasks; | |
using Elsa.Samples.UserRegistration.Web.Models; | |
using Elsa.Scripting.Liquid.Messages; | |
using Fluid; | |
using MediatR; | |
namespace Elsa.Samples.UserRegistration.Web.Handlers | |
{ | |
/// <summary> |