@@ -12,37 +12,37 @@ public enum ResiliencyLevel
12
12
AtMostOnce
13
13
}
14
14
15
- public class Effect ( EffectResults _effectResults )
15
+ public class Effect ( EffectResults effectResults )
16
16
{
17
17
public async Task < bool > Contains ( string id ) => await Contains ( CreateEffectId ( id , EffectType . Effect ) ) ;
18
- internal Task < bool > Contains ( EffectId effectId ) => _effectResults . Contains ( effectId ) ;
18
+ internal Task < bool > Contains ( EffectId effectId ) => effectResults . Contains ( effectId ) ;
19
19
20
20
public async Task < WorkStatus ? > GetStatus ( string id )
21
21
{
22
22
var effectId = CreateEffectId ( id ) ;
23
- var storedEffect = await _effectResults . GetOrValueDefault ( effectId ) ;
23
+ var storedEffect = await effectResults . GetOrValueDefault ( effectId ) ;
24
24
return storedEffect ? . WorkStatus ;
25
25
}
26
26
27
27
public async Task < bool > Mark ( string id )
28
28
{
29
29
var effectId = CreateEffectId ( id ) ;
30
- if ( await _effectResults . Contains ( effectId ) )
30
+ if ( await effectResults . Contains ( effectId ) )
31
31
return false ;
32
32
33
33
var storedEffect = StoredEffect . CreateCompleted ( effectId ) ;
34
- await _effectResults . Set ( storedEffect ) ;
34
+ await effectResults . Set ( storedEffect ) ;
35
35
return true ;
36
36
}
37
37
38
38
public Task < T > CreateOrGet < T > ( string id , T value ) => CreateOrGet ( CreateEffectId ( id ) , value ) ;
39
- internal Task < T > CreateOrGet < T > ( EffectId effectId , T value ) => _effectResults . CreateOrGet ( effectId , value ) ;
39
+ internal Task < T > CreateOrGet < T > ( EffectId effectId , T value ) => effectResults . CreateOrGet ( effectId , value ) ;
40
40
41
41
public async Task Upsert < T > ( string id , T value ) => await Upsert ( CreateEffectId ( id , EffectType . Effect ) , value ) ;
42
- internal Task Upsert < T > ( EffectId effectId , T value ) => _effectResults . Upsert ( effectId , value ) ;
42
+ internal Task Upsert < T > ( EffectId effectId , T value ) => effectResults . Upsert ( effectId , value ) ;
43
43
44
44
public async Task < Option < T > > TryGet < T > ( string id ) => await TryGet < T > ( CreateEffectId ( id , EffectType . Effect ) ) ;
45
- private Task < Option < T > > TryGet < T > ( EffectId effectId ) => _effectResults . TryGet < T > ( effectId ) ;
45
+ private Task < Option < T > > TryGet < T > ( EffectId effectId ) => effectResults . TryGet < T > ( effectId ) ;
46
46
public async Task < T > Get < T > ( string id ) => await Get < T > ( CreateEffectId ( id , EffectType . Effect ) ) ;
47
47
internal async Task < T > Get < T > ( EffectId effectId )
48
48
{
@@ -77,11 +77,11 @@ public async Task<T> Capture<T>(string id, Func<Task<T>> work, ResiliencyLevel r
77
77
=> await InnerCapture ( id , EffectType . Effect , work , resiliency , EffectContext . CurrentContext ) ;
78
78
79
79
private Task InnerCapture ( string id , EffectType effectType , Func < Task > work , ResiliencyLevel resiliency , EffectContext effectContext )
80
- => _effectResults . InnerCapture ( id , effectType , work , resiliency , effectContext ) ;
80
+ => effectResults . InnerCapture ( id , effectType , work , resiliency , effectContext ) ;
81
81
private Task < T > InnerCapture < T > ( string id , EffectType effectType , Func < Task < T > > work , ResiliencyLevel resiliency , EffectContext effectContext )
82
- => _effectResults . InnerCapture ( id , effectType , work , resiliency , effectContext ) ;
82
+ => effectResults . InnerCapture ( id , effectType , work , resiliency , effectContext ) ;
83
83
84
- public Task Clear ( string id ) => _effectResults . Clear ( CreateEffectId ( id ) ) ;
84
+ public Task Clear ( string id ) => effectResults . Clear ( CreateEffectId ( id ) ) ;
85
85
86
86
public Task < T > WhenAny < T > ( string id , params Task < T > [ ] tasks )
87
87
=> Capture ( id , work : async ( ) => await await Task . WhenAny ( tasks ) ) ;
0 commit comments