using System;
using Avalonia.Controls;
using ReactiveUI;

namespace qmonlib.ui.ViewModels;

public class ViewModelBase : ReactiveObject
{
    protected TService GetService<TService>() where TService : notnull
    {
        return (TService)((IServiceProvider)Avalonia.Application.Current.FindResource(typeof(IServiceProvider))).GetService(typeof(TService));
    }
}
