﻿using System;
using System.Threading.Tasks;

namespace Margeta.Extensions.Cli.Hosting
{
    /// <summary>
    /// Represents a console host.
    /// </summary>
    public interface IConsoleHost : IDisposable
    {
        /// <summary>
        /// The IServiceProvider for the host.
        /// </summary>
        IServiceProvider Services { get; }

        /// <summary>
        /// Starts the console host.
        /// </summary>
        void Start();

        /// <summary>
        /// Starts the console host asynchronously.
        /// </summary>
        /// <returns></returns>
        Task StartAsync();
    }
}