@@ -42,10 +42,10 @@ public async Task PrepareFiltersAndHandleMessages()
4242 _processor . ProcessMessageAsync += ProcessMessagesAsync ;
4343 _processor . ProcessErrorAsync += ProcessErrorAsync ;
4444
45- await RemoveDefaultFilters ( ) . ConfigureAwait ( false ) ;
46- await AddFilters ( ) . ConfigureAwait ( false ) ;
45+ await RemoveDefaultFilters ( ) ;
46+ await AddFilters ( ) ;
4747
48- await _processor . StartProcessingAsync ( ) . ConfigureAwait ( false ) ;
48+ await _processor . StartProcessingAsync ( ) ;
4949 }
5050
5151 private async Task RemoveDefaultFilters ( )
@@ -63,8 +63,7 @@ private async Task RemoveDefaultFilters()
6363 {
6464 if ( rule . Name == "GoalsGreaterThanSeven" )
6565 {
66- await _adminClient . DeleteRuleAsync ( TOPIC_PATH , SUBSCRIPTION_NAME , "GoalsGreaterThanSeven" )
67- . ConfigureAwait ( false ) ;
66+ await _adminClient . DeleteRuleAsync ( TOPIC_PATH , SUBSCRIPTION_NAME , "GoalsGreaterThanSeven" ) ;
6867 }
6968 }
7069 }
@@ -78,8 +77,7 @@ private async Task AddFilters()
7877 {
7978 try
8079 {
81- var rules = _adminClient . GetRulesAsync ( TOPIC_PATH , SUBSCRIPTION_NAME )
82- . ConfigureAwait ( false ) ;
80+ var rules = _adminClient . GetRulesAsync ( TOPIC_PATH , SUBSCRIPTION_NAME ) ;
8381
8482 var ruleProperties = new List < RuleProperties > ( ) ;
8583 await foreach ( var rule in rules )
@@ -94,8 +92,7 @@ private async Task AddFilters()
9492 Name = "GoalsGreaterThanSeven" ,
9593 Filter = new SqlRuleFilter ( "goals > 7" )
9694 } ;
97- await _adminClient . CreateRuleAsync ( TOPIC_PATH , SUBSCRIPTION_NAME , createRuleOptions )
98- . ConfigureAwait ( false ) ;
95+ await _adminClient . CreateRuleAsync ( TOPIC_PATH , SUBSCRIPTION_NAME , createRuleOptions ) ;
9996 }
10097 }
10198 catch ( Exception ex )
@@ -107,8 +104,8 @@ await _adminClient.CreateRuleAsync(TOPIC_PATH, SUBSCRIPTION_NAME, createRuleOpti
107104 private async Task ProcessMessagesAsync ( ProcessMessageEventArgs args )
108105 {
109106 var myPayload = args . Message . Body . ToObjectFromJson < MyPayload > ( ) ;
110- await _processData . Process ( myPayload ) . ConfigureAwait ( false ) ;
111- await args . CompleteMessageAsync ( args . Message ) . ConfigureAwait ( false ) ;
107+ await _processData . Process ( myPayload ) ;
108+ await args . CompleteMessageAsync ( args . Message ) ;
112109 }
113110
114111 private Task ProcessErrorAsync ( ProcessErrorEventArgs arg )
@@ -125,17 +122,17 @@ public async ValueTask DisposeAsync()
125122 {
126123 if ( _processor != null )
127124 {
128- await _processor . DisposeAsync ( ) . ConfigureAwait ( false ) ;
125+ await _processor . DisposeAsync ( ) ;
129126 }
130127
131128 if ( _client != null )
132129 {
133- await _client . DisposeAsync ( ) . ConfigureAwait ( false ) ;
130+ await _client . DisposeAsync ( ) ;
134131 }
135132 }
136133
137134 public async Task CloseSubscriptionAsync ( )
138135 {
139- await _processor ! . CloseAsync ( ) . ConfigureAwait ( false ) ;
136+ await _processor ! . CloseAsync ( ) ;
140137 }
141138}
0 commit comments