@@ -164,6 +164,13 @@ public IEnumerable<IConsumer> Consumers
164164 /// </summary>
165165 public long Id { get ; set ; }
166166
167+ public async Task RefreshTokenAsync ( string token )
168+ {
169+ await _management . RefreshTokenAsync ( token )
170+ . ConfigureAwait ( false ) ;
171+ _connectionSettings . UpdateOAuthPassword ( token ) ;
172+ }
173+
167174 // TODO cancellation token
168175 public override async Task OpenAsync ( )
169176 {
@@ -249,7 +256,8 @@ internal void AddPublisher(Guid id, IPublisher consumer)
249256 if ( false == _publishersDict . TryAdd ( id , consumer ) )
250257 {
251258 // TODO create "internal bug" exception type?
252- throw new InvalidOperationException ( "could not add publisher, report via https://github.com/rabbitmq/rabbitmq-amqp-dotnet-client/issues" ) ;
259+ throw new InvalidOperationException (
260+ "could not add publisher, report via https://github.com/rabbitmq/rabbitmq-amqp-dotnet-client/issues" ) ;
253261 }
254262 }
255263
@@ -258,7 +266,8 @@ internal void RemovePublisher(Guid id)
258266 if ( false == _publishersDict . TryRemove ( id , out _ ) )
259267 {
260268 // TODO create "internal bug" exception type?
261- throw new InvalidOperationException ( "could not remove publisher, report via https://github.com/rabbitmq/rabbitmq-amqp-dotnet-client/issues" ) ;
269+ throw new InvalidOperationException (
270+ "could not remove publisher, report via https://github.com/rabbitmq/rabbitmq-amqp-dotnet-client/issues" ) ;
262271 }
263272 }
264273
@@ -268,7 +277,8 @@ internal void AddConsumer(Guid id, IConsumer consumer)
268277 if ( false == _consumersDict . TryAdd ( id , consumer ) )
269278 {
270279 // TODO create "internal bug" exception type?
271- throw new InvalidOperationException ( "could not add consumer, report via https://github.com/rabbitmq/rabbitmq-amqp-dotnet-client/issues" ) ;
280+ throw new InvalidOperationException (
281+ "could not add consumer, report via https://github.com/rabbitmq/rabbitmq-amqp-dotnet-client/issues" ) ;
272282 }
273283 }
274284
@@ -277,7 +287,8 @@ internal void RemoveConsumer(Guid id)
277287 if ( false == _consumersDict . TryRemove ( id , out _ ) )
278288 {
279289 // TODO create "internal bug" exception type?
280- throw new InvalidOperationException ( "could not remove consumer, report via https://github.com/rabbitmq/rabbitmq-amqp-dotnet-client/issues" ) ;
290+ throw new InvalidOperationException (
291+ "could not remove consumer, report via https://github.com/rabbitmq/rabbitmq-amqp-dotnet-client/issues" ) ;
281292 }
282293 }
283294
@@ -639,6 +650,7 @@ private void HandleProperties(Fields properties)
639650 {
640651 value = ( string ) kvp . Value ;
641652 }
653+
642654 _connectionProperties [ key ] = value ;
643655 }
644656
@@ -647,6 +659,7 @@ private void HandleProperties(Fields properties)
647659 {
648660 // TODO Java client throws exception here
649661 }
662+
650663 _areFilterExpressionsSupported = Utils . SupportsFilterExpressions ( brokerVersion ) ;
651664 }
652665 }
0 commit comments