namespace Stary.Evo
{
    public interface IQuery<TResult> : IBelongToArchitecture,ICanSetArchitecture,ICanGetData,ICanGetSystem,ICanGetUtility
    {
        TResult Do();
    }
    
    public abstract class AbstractQuery<T> : IQuery<T>
    {
        public T Do()
        {
            return OnDo();
        }

        protected abstract T OnDo();
        
        private IArchitecture mArchitecture;

        IArchitecture  IBelongToArchitecture.GetArchitecture()
        {
            return mArchitecture;
        }

        void ICanSetArchitecture.SetArchitecture(IArchitecture architecture)
        {
            mArchitecture = architecture;
        }
    }
}