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