﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;

namespace NoesisTest
{
    public class BaseVM
    {
        public ICommand Quit
        {
            get
            {
                return new QuitCommand();
            }
        }

        public object ViewFromCode
        {
            get
            {
                return new IndirectRef();
            }
        }
    }

    public class QuitCommand : ICommand
    {
        public event EventHandler CanExecuteChanged;

        public bool CanExecute(object parameter)
        {
            return true;
        }

        public void Execute(object parameter)
        {
            UnityEngine.Application.Quit();
        }
    }
}
