< Summary

Class:Microsoft.Azure.Graph.RBAC.SignedInUserOperations
Assembly:Microsoft.Azure.Graph.RBAC
File(s):C:\Git\azure-sdk-for-net\sdk\graphrbac\Microsoft.Azure.Graph.RBAC\src\Generated\SignedInUserOperations.cs
Covered lines:4
Uncovered lines:252
Coverable lines:256
Total lines:582
Line coverage:1.5% (4 of 256)
Covered branches:1
Total branches:154
Branch coverage:0.6% (1 of 154)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-80%50%
get_Client()-0%100%
GetWithHttpMessagesAsync()-0%0%
ListOwnedObjectsWithHttpMessagesAsync()-0%0%
ListOwnedObjectsNextWithHttpMessagesAsync()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\graphrbac\Microsoft.Azure.Graph.RBAC\src\Generated\SignedInUserOperations.cs

#LineLine coverage
 1// <auto-generated>
 2// Copyright (c) Microsoft Corporation. All rights reserved.
 3// Licensed under the MIT License. See License.txt in the project root for
 4// license information.
 5//
 6// Code generated by Microsoft (R) AutoRest Code Generator.
 7// Changes may cause incorrect behavior and will be lost if the code is
 8// regenerated.
 9// </auto-generated>
 10
 11namespace Microsoft.Azure.Graph.RBAC
 12{
 13    using Microsoft.Rest;
 14    using Microsoft.Rest.Azure;
 15    using Models;
 16    using Newtonsoft.Json;
 17    using System.Collections;
 18    using System.Collections.Generic;
 19    using System.Linq;
 20    using System.Net;
 21    using System.Net.Http;
 22    using System.Threading;
 23    using System.Threading.Tasks;
 24
 25    /// <summary>
 26    /// SignedInUserOperations operations.
 27    /// </summary>
 28    internal partial class SignedInUserOperations : IServiceOperations<GraphRbacManagementClient>, ISignedInUserOperatio
 29    {
 30        /// <summary>
 31        /// Initializes a new instance of the SignedInUserOperations class.
 32        /// </summary>
 33        /// <param name='client'>
 34        /// Reference to the service client.
 35        /// </param>
 36        /// <exception cref="System.ArgumentNullException">
 37        /// Thrown when a required parameter is null
 38        /// </exception>
 4639        internal SignedInUserOperations(GraphRbacManagementClient client)
 40        {
 4641            if (client == null)
 42            {
 043                throw new System.ArgumentNullException("client");
 44            }
 4645            Client = client;
 4646        }
 47
 48        /// <summary>
 49        /// Gets a reference to the GraphRbacManagementClient
 50        /// </summary>
 051        public GraphRbacManagementClient Client { get; private set; }
 52
 53        /// <summary>
 54        /// Gets the details for the currently logged-in user.
 55        /// </summary>
 56        /// <param name='customHeaders'>
 57        /// Headers that will be added to request.
 58        /// </param>
 59        /// <param name='cancellationToken'>
 60        /// The cancellation token.
 61        /// </param>
 62        /// <exception cref="GraphErrorException">
 63        /// Thrown when the operation returned an invalid status code
 64        /// </exception>
 65        /// <exception cref="SerializationException">
 66        /// Thrown when unable to deserialize the response
 67        /// </exception>
 68        /// <exception cref="ValidationException">
 69        /// Thrown when a required parameter is null
 70        /// </exception>
 71        /// <exception cref="System.ArgumentNullException">
 72        /// Thrown when a required parameter is null
 73        /// </exception>
 74        /// <return>
 75        /// A response object containing the response body and response headers.
 76        /// </return>
 77        public async Task<AzureOperationResponse<User>> GetWithHttpMessagesAsync(Dictionary<string, List<string>> custom
 78        {
 079            if (Client.ApiVersion == null)
 80            {
 081                throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
 82            }
 083            if (Client.TenantID == null)
 84            {
 085                throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.TenantID");
 86            }
 87            // Tracing
 088            bool _shouldTrace = ServiceClientTracing.IsEnabled;
 089            string _invocationId = null;
 090            if (_shouldTrace)
 91            {
 092                _invocationId = ServiceClientTracing.NextInvocationId.ToString();
 093                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
 094                tracingParameters.Add("cancellationToken", cancellationToken);
 095                ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters);
 96            }
 97            // Construct URL
 098            var _baseUrl = Client.BaseUri.AbsoluteUri;
 099            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{tenantID}/me").T
 0100            _url = _url.Replace("{tenantID}", System.Uri.EscapeDataString(Client.TenantID));
 0101            List<string> _queryParameters = new List<string>();
 0102            if (Client.ApiVersion != null)
 103            {
 0104                _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
 105            }
 0106            if (_queryParameters.Count > 0)
 107            {
 0108                _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
 109            }
 110            // Create HTTP transport objects
 0111            var _httpRequest = new HttpRequestMessage();
 0112            HttpResponseMessage _httpResponse = null;
 0113            _httpRequest.Method = new HttpMethod("GET");
 0114            _httpRequest.RequestUri = new System.Uri(_url);
 115            // Set Headers
 0116            if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
 117            {
 0118                _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString())
 119            }
 0120            if (Client.AcceptLanguage != null)
 121            {
 0122                if (_httpRequest.Headers.Contains("accept-language"))
 123                {
 0124                    _httpRequest.Headers.Remove("accept-language");
 125                }
 0126                _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
 127            }
 128
 129
 0130            if (customHeaders != null)
 131            {
 0132                foreach(var _header in customHeaders)
 133                {
 0134                    if (_httpRequest.Headers.Contains(_header.Key))
 135                    {
 0136                        _httpRequest.Headers.Remove(_header.Key);
 137                    }
 0138                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
 139                }
 140            }
 141
 142            // Serialize Request
 0143            string _requestContent = null;
 144            // Set Credentials
 0145            if (Client.Credentials != null)
 146            {
 0147                cancellationToken.ThrowIfCancellationRequested();
 0148                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
 149            }
 150            // Send Request
 0151            if (_shouldTrace)
 152            {
 0153                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
 154            }
 0155            cancellationToken.ThrowIfCancellationRequested();
 0156            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
 0157            if (_shouldTrace)
 158            {
 0159                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
 160            }
 0161            HttpStatusCode _statusCode = _httpResponse.StatusCode;
 0162            cancellationToken.ThrowIfCancellationRequested();
 0163            string _responseContent = null;
 0164            if ((int)_statusCode != 200)
 165            {
 0166                var ex = new GraphErrorException(string.Format("Operation returned an invalid status code '{0}'", _statu
 167                try
 168                {
 0169                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
 0170                    GraphError _errorBody =  Rest.Serialization.SafeJsonConvert.DeserializeObject<GraphError>(_responseC
 0171                    if (_errorBody != null)
 172                    {
 0173                        ex.Body = _errorBody;
 174                    }
 0175                }
 0176                catch (JsonException)
 177                {
 178                    // Ignore the exception
 0179                }
 0180                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
 0181                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
 0182                if (_shouldTrace)
 183                {
 0184                    ServiceClientTracing.Error(_invocationId, ex);
 185                }
 0186                _httpRequest.Dispose();
 0187                if (_httpResponse != null)
 188                {
 0189                    _httpResponse.Dispose();
 190                }
 0191                throw ex;
 192            }
 193            // Create Result
 0194            var _result = new AzureOperationResponse<User>();
 0195            _result.Request = _httpRequest;
 0196            _result.Response = _httpResponse;
 0197            if (_httpResponse.Headers.Contains("x-ms-request-id"))
 198            {
 0199                _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
 200            }
 201            // Deserialize Response
 0202            if ((int)_statusCode == 200)
 203            {
 0204                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
 205                try
 206                {
 0207                    _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject<User>(_responseContent, Client.D
 0208                }
 0209                catch (JsonException ex)
 210                {
 0211                    _httpRequest.Dispose();
 0212                    if (_httpResponse != null)
 213                    {
 0214                        _httpResponse.Dispose();
 215                    }
 0216                    throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
 217                }
 218            }
 0219            if (_shouldTrace)
 220            {
 0221                ServiceClientTracing.Exit(_invocationId, _result);
 222            }
 0223            return _result;
 0224        }
 225
 226        /// <summary>
 227        /// Get the list of directory objects that are owned by the user.
 228        /// </summary>
 229        /// <param name='customHeaders'>
 230        /// Headers that will be added to request.
 231        /// </param>
 232        /// <param name='cancellationToken'>
 233        /// The cancellation token.
 234        /// </param>
 235        /// <exception cref="GraphErrorException">
 236        /// Thrown when the operation returned an invalid status code
 237        /// </exception>
 238        /// <exception cref="SerializationException">
 239        /// Thrown when unable to deserialize the response
 240        /// </exception>
 241        /// <exception cref="ValidationException">
 242        /// Thrown when a required parameter is null
 243        /// </exception>
 244        /// <exception cref="System.ArgumentNullException">
 245        /// Thrown when a required parameter is null
 246        /// </exception>
 247        /// <return>
 248        /// A response object containing the response body and response headers.
 249        /// </return>
 250        public async Task<AzureOperationResponse<IPage<DirectoryObject>>> ListOwnedObjectsWithHttpMessagesAsync(Dictiona
 251        {
 0252            if (Client.ApiVersion == null)
 253            {
 0254                throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
 255            }
 0256            if (Client.TenantID == null)
 257            {
 0258                throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.TenantID");
 259            }
 260            // Tracing
 0261            bool _shouldTrace = ServiceClientTracing.IsEnabled;
 0262            string _invocationId = null;
 0263            if (_shouldTrace)
 264            {
 0265                _invocationId = ServiceClientTracing.NextInvocationId.ToString();
 0266                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
 0267                tracingParameters.Add("cancellationToken", cancellationToken);
 0268                ServiceClientTracing.Enter(_invocationId, this, "ListOwnedObjects", tracingParameters);
 269            }
 270            // Construct URL
 0271            var _baseUrl = Client.BaseUri.AbsoluteUri;
 0272            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{tenantID}/me/own
 0273            _url = _url.Replace("{tenantID}", System.Uri.EscapeDataString(Client.TenantID));
 0274            List<string> _queryParameters = new List<string>();
 0275            if (Client.ApiVersion != null)
 276            {
 0277                _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
 278            }
 0279            if (_queryParameters.Count > 0)
 280            {
 0281                _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
 282            }
 283            // Create HTTP transport objects
 0284            var _httpRequest = new HttpRequestMessage();
 0285            HttpResponseMessage _httpResponse = null;
 0286            _httpRequest.Method = new HttpMethod("GET");
 0287            _httpRequest.RequestUri = new System.Uri(_url);
 288            // Set Headers
 0289            if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
 290            {
 0291                _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString())
 292            }
 0293            if (Client.AcceptLanguage != null)
 294            {
 0295                if (_httpRequest.Headers.Contains("accept-language"))
 296                {
 0297                    _httpRequest.Headers.Remove("accept-language");
 298                }
 0299                _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
 300            }
 301
 302
 0303            if (customHeaders != null)
 304            {
 0305                foreach(var _header in customHeaders)
 306                {
 0307                    if (_httpRequest.Headers.Contains(_header.Key))
 308                    {
 0309                        _httpRequest.Headers.Remove(_header.Key);
 310                    }
 0311                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
 312                }
 313            }
 314
 315            // Serialize Request
 0316            string _requestContent = null;
 317            // Set Credentials
 0318            if (Client.Credentials != null)
 319            {
 0320                cancellationToken.ThrowIfCancellationRequested();
 0321                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
 322            }
 323            // Send Request
 0324            if (_shouldTrace)
 325            {
 0326                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
 327            }
 0328            cancellationToken.ThrowIfCancellationRequested();
 0329            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
 0330            if (_shouldTrace)
 331            {
 0332                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
 333            }
 0334            HttpStatusCode _statusCode = _httpResponse.StatusCode;
 0335            cancellationToken.ThrowIfCancellationRequested();
 0336            string _responseContent = null;
 0337            if ((int)_statusCode != 200)
 338            {
 0339                var ex = new GraphErrorException(string.Format("Operation returned an invalid status code '{0}'", _statu
 340                try
 341                {
 0342                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
 0343                    GraphError _errorBody =  Rest.Serialization.SafeJsonConvert.DeserializeObject<GraphError>(_responseC
 0344                    if (_errorBody != null)
 345                    {
 0346                        ex.Body = _errorBody;
 347                    }
 0348                }
 0349                catch (JsonException)
 350                {
 351                    // Ignore the exception
 0352                }
 0353                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
 0354                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
 0355                if (_shouldTrace)
 356                {
 0357                    ServiceClientTracing.Error(_invocationId, ex);
 358                }
 0359                _httpRequest.Dispose();
 0360                if (_httpResponse != null)
 361                {
 0362                    _httpResponse.Dispose();
 363                }
 0364                throw ex;
 365            }
 366            // Create Result
 0367            var _result = new AzureOperationResponse<IPage<DirectoryObject>>();
 0368            _result.Request = _httpRequest;
 0369            _result.Response = _httpResponse;
 0370            if (_httpResponse.Headers.Contains("x-ms-request-id"))
 371            {
 0372                _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
 373            }
 374            // Deserialize Response
 0375            if ((int)_statusCode == 200)
 376            {
 0377                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
 378                try
 379                {
 0380                    _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject<Page<DirectoryObject>>(_response
 0381                }
 0382                catch (JsonException ex)
 383                {
 0384                    _httpRequest.Dispose();
 0385                    if (_httpResponse != null)
 386                    {
 0387                        _httpResponse.Dispose();
 388                    }
 0389                    throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
 390                }
 391            }
 0392            if (_shouldTrace)
 393            {
 0394                ServiceClientTracing.Exit(_invocationId, _result);
 395            }
 0396            return _result;
 0397        }
 398
 399        /// <summary>
 400        /// Get the list of directory objects that are owned by the user.
 401        /// </summary>
 402        /// <param name='nextLink'>
 403        /// Next link for the list operation.
 404        /// </param>
 405        /// <param name='customHeaders'>
 406        /// Headers that will be added to request.
 407        /// </param>
 408        /// <param name='cancellationToken'>
 409        /// The cancellation token.
 410        /// </param>
 411        /// <exception cref="GraphErrorException">
 412        /// Thrown when the operation returned an invalid status code
 413        /// </exception>
 414        /// <exception cref="SerializationException">
 415        /// Thrown when unable to deserialize the response
 416        /// </exception>
 417        /// <exception cref="ValidationException">
 418        /// Thrown when a required parameter is null
 419        /// </exception>
 420        /// <exception cref="System.ArgumentNullException">
 421        /// Thrown when a required parameter is null
 422        /// </exception>
 423        /// <return>
 424        /// A response object containing the response body and response headers.
 425        /// </return>
 426        public async Task<AzureOperationResponse<IPage<DirectoryObject>>> ListOwnedObjectsNextWithHttpMessagesAsync(stri
 427        {
 0428            if (nextLink == null)
 429            {
 0430                throw new ValidationException(ValidationRules.CannotBeNull, "nextLink");
 431            }
 0432            if (Client.ApiVersion == null)
 433            {
 0434                throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
 435            }
 0436            if (Client.TenantID == null)
 437            {
 0438                throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.TenantID");
 439            }
 440            // Tracing
 0441            bool _shouldTrace = ServiceClientTracing.IsEnabled;
 0442            string _invocationId = null;
 0443            if (_shouldTrace)
 444            {
 0445                _invocationId = ServiceClientTracing.NextInvocationId.ToString();
 0446                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
 0447                tracingParameters.Add("nextLink", nextLink);
 0448                tracingParameters.Add("cancellationToken", cancellationToken);
 0449                ServiceClientTracing.Enter(_invocationId, this, "ListOwnedObjectsNext", tracingParameters);
 450            }
 451            // Construct URL
 0452            var _baseUrl = Client.BaseUri.AbsoluteUri;
 0453            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "{tenantID}/{nextL
 0454            _url = _url.Replace("{nextLink}", nextLink);
 0455            _url = _url.Replace("{tenantID}", System.Uri.EscapeDataString(Client.TenantID));
 0456            List<string> _queryParameters = new List<string>();
 0457            if (Client.ApiVersion != null)
 458            {
 0459                _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
 460            }
 0461            if (_queryParameters.Count > 0)
 462            {
 0463                _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
 464            }
 465            // Create HTTP transport objects
 0466            var _httpRequest = new HttpRequestMessage();
 0467            HttpResponseMessage _httpResponse = null;
 0468            _httpRequest.Method = new HttpMethod("GET");
 0469            _httpRequest.RequestUri = new System.Uri(_url);
 470            // Set Headers
 0471            if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
 472            {
 0473                _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString())
 474            }
 0475            if (Client.AcceptLanguage != null)
 476            {
 0477                if (_httpRequest.Headers.Contains("accept-language"))
 478                {
 0479                    _httpRequest.Headers.Remove("accept-language");
 480                }
 0481                _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
 482            }
 483
 484
 0485            if (customHeaders != null)
 486            {
 0487                foreach(var _header in customHeaders)
 488                {
 0489                    if (_httpRequest.Headers.Contains(_header.Key))
 490                    {
 0491                        _httpRequest.Headers.Remove(_header.Key);
 492                    }
 0493                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
 494                }
 495            }
 496
 497            // Serialize Request
 0498            string _requestContent = null;
 499            // Set Credentials
 0500            if (Client.Credentials != null)
 501            {
 0502                cancellationToken.ThrowIfCancellationRequested();
 0503                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
 504            }
 505            // Send Request
 0506            if (_shouldTrace)
 507            {
 0508                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
 509            }
 0510            cancellationToken.ThrowIfCancellationRequested();
 0511            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
 0512            if (_shouldTrace)
 513            {
 0514                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
 515            }
 0516            HttpStatusCode _statusCode = _httpResponse.StatusCode;
 0517            cancellationToken.ThrowIfCancellationRequested();
 0518            string _responseContent = null;
 0519            if ((int)_statusCode != 200)
 520            {
 0521                var ex = new GraphErrorException(string.Format("Operation returned an invalid status code '{0}'", _statu
 522                try
 523                {
 0524                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
 0525                    GraphError _errorBody =  Rest.Serialization.SafeJsonConvert.DeserializeObject<GraphError>(_responseC
 0526                    if (_errorBody != null)
 527                    {
 0528                        ex.Body = _errorBody;
 529                    }
 0530                }
 0531                catch (JsonException)
 532                {
 533                    // Ignore the exception
 0534                }
 0535                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
 0536                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
 0537                if (_shouldTrace)
 538                {
 0539                    ServiceClientTracing.Error(_invocationId, ex);
 540                }
 0541                _httpRequest.Dispose();
 0542                if (_httpResponse != null)
 543                {
 0544                    _httpResponse.Dispose();
 545                }
 0546                throw ex;
 547            }
 548            // Create Result
 0549            var _result = new AzureOperationResponse<IPage<DirectoryObject>>();
 0550            _result.Request = _httpRequest;
 0551            _result.Response = _httpResponse;
 0552            if (_httpResponse.Headers.Contains("x-ms-request-id"))
 553            {
 0554                _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
 555            }
 556            // Deserialize Response
 0557            if ((int)_statusCode == 200)
 558            {
 0559                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
 560                try
 561                {
 0562                    _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject<Page<DirectoryObject>>(_response
 0563                }
 0564                catch (JsonException ex)
 565                {
 0566                    _httpRequest.Dispose();
 0567                    if (_httpResponse != null)
 568                    {
 0569                        _httpResponse.Dispose();
 570                    }
 0571                    throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
 572                }
 573            }
 0574            if (_shouldTrace)
 575            {
 0576                ServiceClientTracing.Exit(_invocationId, _result);
 577            }
 0578            return _result;
 0579        }
 580
 581    }
 582}