|  |  | 1 |  | namespace Microsoft.Azure.Batch.Protocol | 
|  |  | 2 |  | { | 
|  |  | 3 |  |     using Microsoft.Rest; | 
|  |  | 4 |  |     using Microsoft.Rest.Azure; | 
|  |  | 5 |  |     using System; | 
|  |  | 6 |  |  | 
|  |  | 7 |  |     /// <summary> | 
|  |  | 8 |  |     /// A BatchClientBehavior that enables inspection and modification of the BatchResponse. | 
|  |  | 9 |  |     /// </summary> | 
|  |  | 10 |  |     public class ResponseInterceptor : BatchClientBehavior | 
|  |  | 11 |  |     { | 
|  |  | 12 |  |         /// <summary> | 
|  |  | 13 |  |         /// A callback that can inspect and modify a BatchResponse. | 
|  |  | 14 |  |         /// </summary> | 
|  |  | 15 |  |         /// <param name="response">The response to be inspected and optionally modified.</param> | 
|  |  | 16 |  |         /// <param name="request">The request to which the <paramref name="response"/> is a response.</param> | 
|  |  | 17 |  |         public delegate System.Threading.Tasks.Task<IAzureOperationResponse> BatchResponseInterceptHandler(IAzureOperati | 
|  |  | 18 |  |  | 
|  | 0 | 19 |  |         private ResponseInterceptor() | 
|  |  | 20 |  |         { | 
|  | 0 | 21 |  |         } | 
|  |  | 22 |  |  | 
|  |  | 23 |  |         /// <summary> | 
|  |  | 24 |  |         /// Initializes a new instance of the <see cref="ResponseInterceptor"/> class. | 
|  |  | 25 |  |         /// </summary> | 
|  |  | 26 |  |         /// <param name="responseInterceptHandler">The method to invoke on the intercepted response.</param> | 
|  | 0 | 27 |  |         public ResponseInterceptor(BatchResponseInterceptHandler responseInterceptHandler) | 
|  |  | 28 |  |         { | 
|  | 0 | 29 |  |             this.ResponseInterceptHandler = responseInterceptHandler; | 
|  | 0 | 30 |  |         } | 
|  |  | 31 |  |  | 
|  |  | 32 |  |         /// <summary> | 
|  |  | 33 |  |         /// Gets or sets the method to invoke on the intercepted response. | 
|  |  | 34 |  |         /// </summary> | 
|  |  | 35 |  |         public BatchResponseInterceptHandler ResponseInterceptHandler | 
|  |  | 36 |  |         { | 
|  | 0 | 37 |  |             get; | 
|  | 0 | 38 |  |             set; | 
|  |  | 39 |  |         } | 
|  |  | 40 |  |     } | 
|  |  | 41 |  | } |