// Generated by @typespec/http-server-csharp
// <auto-generated />
#nullable enable

using Microsoft.AspNetCore.Mvc;
using System;
using System.Net;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

namespace PetStore;

/// <summary>
/// This is a mock implementation of the business logic interface for
/// demonstration and early development.  Feel free to overwrite this file.
/// Or replace it with another implementation, and register that implementation
/// in the dependency injection container
/// </summary>
public class Dogs : IDogs
{
    /// <summary>
    /// The controller constructor, using the dependency injection container to satisfy the parameters.
    /// </summary>
    /// <param name="initializer">The initializer class, registered with dependency injection</param>
    /// <param name="accessor">The accessor for the HttpContext, allows your implementation to
    /// get properties of the incoming request and to set properties of the outgoing response.</param>
    public Dogs(IInitializer initializer, IHttpContextAccessor accessor)
    {
        _initializer = initializer;
        HttpContextAccessor = accessor;
    }

    private IInitializer _initializer;

    /// <summary>
    /// Use this property in your implementation to access properties of the incoming HttpRequest
    /// and to set properties of the outgoing HttpResponse
    /// </summary>
    public IHttpContextAccessor HttpContextAccessor { get; }

    public Task<Dog[]> ListAsync()
    {
    return Task.FromResult<Dog[]>([]);
    }

    public Task<Dog> ReadAsync(long id)
    {
    return Task.FromResult(_initializer.Initialize<Dog>());
    }
}
