Skip to content

Commit 93898c1

Browse files
authored
Merge pull request #101 from Atypical-Consulting/features/undo-redo
build: upgrade to net9.0
2 parents 4d544b9 + 2095a90 commit 93898c1

File tree

57 files changed

+76
-193
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+76
-193
lines changed

.run/Atypical.VirtualFileSystem.DemoCli.run.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="Atypical.VirtualFileSystem.DemoCli" type="DotNetProject" factoryName=".NET Project">
3-
<option name="EXE_PATH" value="$PROJECT_DIR$/Atypical.VirtualFileSystem.DemoCli/bin/Debug/net8.0/Atypical.VirtualFileSystem.DemoCli" />
4-
<option name="PROGRAM_PARAMETERS" value="" />
5-
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Atypical.VirtualFileSystem.DemoCli/bin/Debug/net8.0" />
3+
<option name="EXE_PATH" value="$PROJECT_DIR$/Atypical.VirtualFileSystem.DemoCli/bin/Debug/net9.0/Atypical.VirtualFileSystem.DemoCli" />
4+
<option name="PROGRAM_PARAMETERS" value="demo" />
5+
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/Atypical.VirtualFileSystem.DemoCli/bin/Debug/net9.0" />
66
<option name="PASS_PARENT_ENVS" value="1" />
77
<option name="USE_EXTERNAL_CONSOLE" value="0" />
88
<option name="USE_MONO" value="0" />
@@ -12,7 +12,7 @@
1212
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
1313
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
1414
<option name="PROJECT_KIND" value="DotNetCore" />
15-
<option name="PROJECT_TFM" value="net8.0" />
15+
<option name="PROJECT_TFM" value="net9.0" />
1616
<method v="2">
1717
<option name="Build" />
1818
</method>

Atypical.VirtualFileSystem.DemoCli/Atypical.VirtualFileSystem.DemoCli.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="Spectre.Console" Version="0.48.0" />
9-
<PackageReference Include="Spectre.Console.Cli" Version="0.48.0" />
8+
<PackageReference Include="Spectre.Console" Version="0.49.1" />
9+
<PackageReference Include="Spectre.Console.Cli" Version="0.49.1" />
1010
</ItemGroup>
1111

1212
<ItemGroup>

Atypical.VirtualFileSystem.DemoCli/Commands/DemonstrateVFS.cs

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ public override int Execute(CommandContext context)
3737

3838
// Rename a file
3939
ProcessStep(vfs, "RENAME A FILE",
40-
() => vfs.RenameFile(new VFSFilePath("/heroes/ironman.txt"), "tommy_stark.txt"));
40+
() => vfs.RenameFile(new VFSFilePath("/heroes/ironman.txt"), "tony_stark.txt"));
4141

4242
// UNDO
43-
ProcessStep(vfs, "UNDO", () => vfs.ChangeHistory.Undo());
43+
// ProcessStep(vfs, "UNDO", () => vfs.ChangeHistory.Undo());
4444

4545
// REDO
46-
ProcessStep(vfs, "REDO", () => vfs.ChangeHistory.Redo());
46+
// ProcessStep(vfs, "REDO", () => vfs.ChangeHistory.Redo());
4747

4848
// Move a file
4949
ProcessStep(vfs, "MOVE A FILE",
@@ -73,14 +73,16 @@ private static void SubscribeToWriteVFSEvents(
7373
IVirtualFileSystem virtualFileSystem,
7474
Action<VFSEventArgs> action)
7575
{
76-
virtualFileSystem.DirectoryCreated += action;
77-
virtualFileSystem.FileCreated += action;
78-
virtualFileSystem.DirectoryDeleted += action;
79-
virtualFileSystem.FileDeleted += action;
80-
virtualFileSystem.DirectoryMoved += action;
81-
virtualFileSystem.FileMoved += action;
82-
virtualFileSystem.DirectoryRenamed += action;
83-
virtualFileSystem.FileRenamed += action;
76+
// ReSharper disable ConvertClosureToMethodGroup
77+
virtualFileSystem.DirectoryCreated += args => action(args);
78+
virtualFileSystem.FileCreated += args => action(args);
79+
virtualFileSystem.DirectoryDeleted += args => action(args);
80+
virtualFileSystem.FileDeleted += args => action(args);
81+
virtualFileSystem.DirectoryMoved += args => action(args);
82+
virtualFileSystem.FileMoved += args => action(args);
83+
virtualFileSystem.DirectoryRenamed += args => action(args);
84+
virtualFileSystem.FileRenamed += args => action(args);
85+
// ReSharper restore ConvertClosureToMethodGroup
8486
}
8587

8688
private static void OnChange(VFSEventArgs args)

Atypical.VirtualFileSystem.DemoCli/Extensions/TreeExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2022-2023, Atypical Consulting SRL
1+
// Copyright (c) 2022-2024, Atypical Consulting SRL
22
// All rights reserved... but seriously, we're open to sharing if you ask nicely!
33
//
44
// This source code is licensed under the BSD-style license found in the

Atypical.VirtualFileSystem.DemoCli/WIP/FileSystemWatcher.cs

Lines changed: 0 additions & 79 deletions
This file was deleted.

Atypical.VirtualFileSystem.DemoCli/WIP/IFileSystemWatcher.cs

Lines changed: 0 additions & 15 deletions
This file was deleted.

Atypical.VirtualFileSystem.DemoCli/WIP/VFSNodeType.cs

Lines changed: 0 additions & 23 deletions
This file was deleted.

Directory.Build.props

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
3+
<TargetFramework>net9.0</TargetFramework>
44
<ImplicitUsings>enable</ImplicitUsings>
55
<Nullable>enable</Nullable>
66
<LangVersion>12</LangVersion>
@@ -10,9 +10,9 @@
1010
<!-- Versioning -->
1111
<!-- https://saebamini.com/how-to-version-your-net-nuget-packages-libraries-and-assemblies-azure-yaml-pipelines-example-using-net-core-cli/ -->
1212
<PropertyGroup>
13-
<Version>0.4.0</Version>
14-
<AssemblyVersion>0.4.0</AssemblyVersion>
15-
<FileVersion>0.4.0</FileVersion>
16-
<InformationalVersion>0.4.0</InformationalVersion>
13+
<Version>0.5.0</Version>
14+
<AssemblyVersion>0.5.0</AssemblyVersion>
15+
<FileVersion>0.5.0</FileVersion>
16+
<InformationalVersion>0.5.0</InformationalVersion>
1717
</PropertyGroup>
1818
</Project>

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "8.0.0",
3+
"version": "9.0.0",
44
"rollForward": "latestMajor",
55
"allowPrerelease": false
66
}

src/Atypical.VirtualFileSystem.Core/Atypical.VirtualFileSystem.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<PrivateAssets>all</PrivateAssets>
2222
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2323
</PackageReference>
24-
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
24+
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.0" />
2525
</ItemGroup>
2626

2727
<!-- NuGet metadata -->

0 commit comments

Comments
 (0)