Nuget cleanup, remove MvvmGen from some project
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MvvmGen" Version="1.2.1" />
|
||||
<PackageReference Include="PropertyChanged.SourceGenerator" Version="1.0.8">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>12</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
@@ -16,7 +17,6 @@
|
||||
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0" />
|
||||
<PackageReference Include="morelinq" Version="3.4.2" />
|
||||
<PackageReference Include="MvvmGen" Version="1.2.1" />
|
||||
<PackageReference Include="ObservableComputations" Version="2.3.0" />
|
||||
<PackageReference Include="PdfPig" Version="0.1.8" />
|
||||
<PackageReference Include="PropertyChanged.SourceGenerator" Version="1.0.8">
|
||||
|
||||
@@ -6,33 +6,30 @@ using FileTime.Core.Behaviors;
|
||||
using FileTime.Core.Helper;
|
||||
using FileTime.Core.Models;
|
||||
using MoreLinq;
|
||||
using MvvmGen;
|
||||
using PropertyChanged.SourceGenerator;
|
||||
|
||||
namespace FileTime.App.Core.ViewModels;
|
||||
|
||||
[ViewModel]
|
||||
[Inject(typeof(IAppState), "_appState")]
|
||||
[Inject(typeof(IItemNameConverterService), "_itemNameConverterService")]
|
||||
public abstract partial class ItemViewModel : IItemViewModel
|
||||
public abstract partial class ItemViewModel(IItemNameConverterService itemNameConverterService, IAppState appState) : IItemViewModel
|
||||
{
|
||||
private ITabViewModel? _parentTab;
|
||||
|
||||
[Property] private IItem? _baseItem;
|
||||
[Notify] private IItem? _baseItem;
|
||||
|
||||
[Property] private string? _displayNameText;
|
||||
[Notify] private string? _displayNameText;
|
||||
|
||||
[Property] private IDeclarativeProperty<bool> _isSelected;
|
||||
[Notify] private IDeclarativeProperty<bool> _isSelected = null!;
|
||||
|
||||
[Property] private IDeclarativeProperty<bool>? _isMarked;
|
||||
[Notify] private IDeclarativeProperty<bool> _isMarked = null!;
|
||||
|
||||
[Property] private IDeclarativeProperty<ItemViewMode> _viewMode;
|
||||
[Notify] private IDeclarativeProperty<ItemViewMode> _viewMode = null!;
|
||||
|
||||
[Property] private DateTime? _createdAt;
|
||||
[Property] private DateTime? _modifiedAt;
|
||||
[Notify] private DateTime? _createdAt;
|
||||
[Notify] private DateTime? _modifiedAt;
|
||||
|
||||
[Property] private string? _attributes;
|
||||
[Notify] private string? _attributes;
|
||||
|
||||
[Property] private IDeclarativeProperty<bool> _isAlternative;
|
||||
[Notify] private IDeclarativeProperty<bool> _isAlternative = null!;
|
||||
|
||||
public IDeclarativeProperty<IReadOnlyList<ItemNamePart>>? DisplayName { get; private set; }
|
||||
|
||||
@@ -45,7 +42,7 @@ public abstract partial class ItemViewModel : IItemViewModel
|
||||
|
||||
var sourceCollection = itemViewModelType switch
|
||||
{
|
||||
ItemViewModelType.Main => parentTab.CurrentItems!,
|
||||
ItemViewModelType.Main => parentTab.CurrentItems,
|
||||
ItemViewModelType.Parent => parentTab.ParentsChildren,
|
||||
ItemViewModelType.SelectedChild => parentTab.SelectedsChildren,
|
||||
_ => throw new InvalidEnumArgumentException()
|
||||
@@ -53,11 +50,11 @@ public abstract partial class ItemViewModel : IItemViewModel
|
||||
|
||||
var displayName = itemViewModelType switch
|
||||
{
|
||||
ItemViewModelType.Main => _appState.RapidTravelTextDebounced.Map(async s =>
|
||||
_appState.ViewMode.Value != Models.Enums.ViewMode.RapidTravel
|
||||
&& _appState.SelectedTab.Value?.CurrentLocation.Value?.Provider is IItemNameConverterProvider nameConverterProvider
|
||||
ItemViewModelType.Main => appState.RapidTravelTextDebounced.Map(async s =>
|
||||
appState.ViewMode.Value != Models.Enums.ViewMode.RapidTravel
|
||||
&& appState.SelectedTab.Value?.CurrentLocation.Value?.Provider is IItemNameConverterProvider nameConverterProvider
|
||||
? (IReadOnlyList<ItemNamePart>) await nameConverterProvider.GetItemNamePartsAsync(item)
|
||||
: _itemNameConverterService.GetDisplayName(item.DisplayName, s)
|
||||
: itemNameConverterService.GetDisplayName(item.DisplayName, s)
|
||||
),
|
||||
_ => new DeclarativeProperty<IReadOnlyList<ItemNamePart>>(new List<ItemNamePart> {new(item.DisplayName)})!,
|
||||
};
|
||||
|
||||
@@ -1,24 +1,20 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using DeclarativeProperty;
|
||||
using DynamicData;
|
||||
using DynamicData.Binding;
|
||||
using FileTime.App.Core.Extensions;
|
||||
using FileTime.App.Core.Models.Enums;
|
||||
using FileTime.App.Core.Services;
|
||||
using FileTime.Core.Enums;
|
||||
using FileTime.Core.Models;
|
||||
using FileTime.Core.Services;
|
||||
using FileTime.Core.Timeline;
|
||||
using InitableService;
|
||||
using MvvmGen;
|
||||
using ObservableComputations;
|
||||
using IContainer = FileTime.Core.Models.IContainer;
|
||||
using static System.DeferTools;
|
||||
|
||||
namespace FileTime.App.Core.ViewModels;
|
||||
|
||||
[ViewModel]
|
||||
public partial class TabViewModel : ITabViewModel
|
||||
public class TabViewModel : ITabViewModel
|
||||
{
|
||||
private readonly IServiceProvider _serviceProvider;
|
||||
private readonly ITimelessContentProvider _timelessContentProvider;
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
|
||||
<PackageReference Include="MvvmGen" Version="1.2.1" />
|
||||
<PackageReference Include="PropertyChanged.SourceGenerator" Version="1.0.8">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
<PackageReference Include="Serilog.Extensions.Logging" Version="7.0.0" />
|
||||
<PackageReference Include="Serilog.Settings.Configuration" Version="7.0.1" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||
<PackageReference Include="Terminal.Gui" Version="1.13.5" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="Exists('appsettings.json') AND '$(Configuration)' == 'Debug'">
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="7.0.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="7.0.11" />
|
||||
<PackageReference Include="Serilog.Extensions.Logging" Version="7.0.0" />
|
||||
<PackageReference Include="TypedSignalR.Client" Version="3.4.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
|
||||
Reference in New Issue
Block a user