Skip to content

Commit 4f75c7a

Browse files
committed
fix typo in PersistanceFactory
1 parent a761d78 commit 4f75c7a

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/WorkflowCore/Models/WorkflowOptions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace WorkflowCore.Models
88
{
99
public class WorkflowOptions
1010
{
11-
internal Func<IServiceProvider, IPersistenceProvider> PersistanceFactory;
11+
internal Func<IServiceProvider, IPersistenceProvider> PersistenceFactory;
1212
internal Func<IServiceProvider, IQueueProvider> QueueFactory;
1313
internal Func<IServiceProvider, IDistributedLockProvider> LockFactory;
1414
internal Func<IServiceProvider, ILifeCycleEventHub> EventHubFactory;
@@ -29,7 +29,7 @@ public WorkflowOptions(IServiceCollection services)
2929

3030
QueueFactory = new Func<IServiceProvider, IQueueProvider>(sp => new SingleNodeQueueProvider());
3131
LockFactory = new Func<IServiceProvider, IDistributedLockProvider>(sp => new SingleNodeLockProvider());
32-
PersistanceFactory = new Func<IServiceProvider, IPersistenceProvider>(sp => new TransientMemoryPersistenceProvider(sp.GetService<ISingletonMemoryProvider>()));
32+
PersistenceFactory = new Func<IServiceProvider, IPersistenceProvider>(sp => new TransientMemoryPersistenceProvider(sp.GetService<ISingletonMemoryProvider>()));
3333
SearchIndexFactory = new Func<IServiceProvider, ISearchIndex>(sp => new NullSearchIndex());
3434
EventHubFactory = new Func<IServiceProvider, ILifeCycleEventHub>(sp => new SingleNodeEventHub(sp.GetService<ILoggerFactory>()));
3535
}
@@ -42,7 +42,7 @@ public WorkflowOptions(IServiceCollection services)
4242

4343
public void UsePersistence(Func<IServiceProvider, IPersistenceProvider> factory)
4444
{
45-
PersistanceFactory = factory;
45+
PersistenceFactory = factory;
4646
}
4747

4848
public void UseDistributedLockManager(Func<IServiceProvider, IDistributedLockProvider> factory)

src/WorkflowCore/ServiceCollectionExtensions.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ public static IServiceCollection AddWorkflow(this IServiceCollection services, A
2020
var options = new WorkflowOptions(services);
2121
setupAction?.Invoke(options);
2222
services.AddSingleton<ISingletonMemoryProvider, MemoryPersistenceProvider>();
23-
services.AddTransient<IPersistenceProvider>(options.PersistanceFactory);
24-
services.AddTransient<IWorkflowRepository>(options.PersistanceFactory);
25-
services.AddTransient<ISubscriptionRepository>(options.PersistanceFactory);
26-
services.AddTransient<IEventRepository>(options.PersistanceFactory);
23+
services.AddTransient<IPersistenceProvider>(options.PersistenceFactory);
24+
services.AddTransient<IWorkflowRepository>(options.PersistenceFactory);
25+
services.AddTransient<ISubscriptionRepository>(options.PersistenceFactory);
26+
services.AddTransient<IEventRepository>(options.PersistenceFactory);
2727
services.AddSingleton<IQueueProvider>(options.QueueFactory);
2828
services.AddSingleton<IDistributedLockProvider>(options.LockFactory);
2929
services.AddSingleton<ILifeCycleEventHub>(options.EventHubFactory);

0 commit comments

Comments
 (0)