﻿using System.Reflection;
using Hardcore.ApplicationModel;

namespace Hardcore.Console
{
    /// <summary>
    /// Provides abilities to work with console
    /// </summary>
    [ServiceContract]
    public interface IConsoleUtils
    {
        /// <summary>
        /// Gets execution module path
        /// </summary>
        /// <returns></returns>
        string GetExecutionPath();
    }

    class ConsoleUtils : IConsoleUtils
    {
        public string GetExecutionPath()
        {
            return Assembly.GetEntryAssembly().Location;
        }
    }
}