/// <param name='operations'>
 /// Reference to the Offleaseonly.ICarOperations.
 /// </param>
 /// <param name='vin'>
 /// Required.
 /// </param>
 public static Car Get(this ICarOperations operations, string vin)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((ICarOperations)s).GetAsync(vin);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Initializes a new instance of the OffleaseonlyClient class.
 /// </summary>
 /// <param name='handlers'>
 /// Optional. The set of delegating handlers to insert in the http
 /// client pipeline.
 /// </param>
 public OffleaseonlyClient(params DelegatingHandler[] handlers)
     : base(handlers)
 {
     this._car     = new CarOperations(this);
     this._cars    = new Cars(this);
     this._scrape  = new Scrape(this);
     this._stats   = new Stats(this);
     this._baseUri = new Uri("http://offleaseonly.azurewebsites.net");
 }
 /// <summary>
 /// Initializes a new instance of the OffleaseonlyClient class.
 /// </summary>
 public OffleaseonlyClient()
     : base()
 {
     this._car     = new CarOperations(this);
     this._cars    = new Cars(this);
     this._scrape  = new Scrape(this);
     this._stats   = new Stats(this);
     this._baseUri = new Uri("http://offleaseonly.azurewebsites.net");
 }
 public HomeController(IDbOperations dbOperations, ICarOperations carOperations, ILogger <HomeController> logger)
 {
     db      = dbOperations;
     _logger = logger;
     carDb   = carOperations;
 }
        /// <param name='operations'>
        /// Reference to the Offleaseonly.ICarOperations.
        /// </param>
        /// <param name='vin'>
        /// Required.
        /// </param>
        /// <param name='cancellationToken'>
        /// Cancellation token.
        /// </param>
        public static async Task <Car> GetAsync(this ICarOperations operations, string vin, CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            Microsoft.Rest.HttpOperationResponse <Offleaseonly.Models.Car> result = await operations.GetWithOperationResponseAsync(vin, cancellationToken).ConfigureAwait(false);

            return(result.Body);
        }