Skip to content

Commit

Permalink
removed redundant code
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Tomlinson committed Jul 27, 2023
1 parent 0a34d09 commit 32e60f4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/DeferredStateStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Dapr.PluggableComponents.Components.StateStore;
using Dapr.PluggableComponents.Components;

internal sealed record DeferredContext(MetadataRequest? MetadataRequest, IServiceProvider ServiceProvider, string InstanceId, TaskCompletionSource AllowInitToComplete);
internal sealed record DeferredContext(MetadataRequest? MetadataRequest, IServiceProvider ServiceProvider, string InstanceId);

internal static class DaprPluggableComponentsServiceBuilderExtensions
{
Expand All @@ -21,7 +21,6 @@ internal sealed class DeferredStateStore<T> : IStateStore, IPluggableComponentFe
private T stateStore;
private readonly IServiceProvider serviceProvider;
private readonly string instanceId;
private readonly TaskCompletionSource allowInitToComplete;

public DeferredStateStore(IServiceProvider serviceProvider, Func<DeferredContext, Task<T>> componentFactory, string instanceId)

Check warning on line 25 in src/DeferredStateStore.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable field 'stateStore' must contain a non-null value when exiting constructor. Consider declaring the field as nullable.
{
Expand All @@ -44,7 +43,7 @@ public Task DeleteAsync(StateStoreDeleteRequest request, CancellationToken cance

public async Task InitAsync(MetadataRequest request, CancellationToken cancellationToken = default)
{
this.stateStore = await this.componentFactory(new DeferredContext(request, serviceProvider, instanceId, allowInitToComplete));
this.stateStore = await this.componentFactory(new DeferredContext(request, serviceProvider, instanceId));

return;
}
Expand Down

0 comments on commit 32e60f4

Please sign in to comment.