Skip to content

Commit

Permalink
Merge pull request #52 from Atypical-Consulting/features/code-quality
Browse files Browse the repository at this point in the history
refactor: Use 'var' (simple types)
  • Loading branch information
phmatray authored Sep 13, 2023
2 parents 7f0e964 + b8c700a commit b4b5bb7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions Atypical.VirtualFileSystem.DemoCli/Program.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// See https://aka.ms/new-console-template for more information

using Atypical.VirtualFileSystem.Core;
using Atypical.VirtualFileSystem.Core.Contracts;
using Atypical.VirtualFileSystem.DemoCli;
using Spectre.Console;

// Create a virtual file system
var factory = new VirtualFileSystemFactory();
IVirtualFileSystem vfs = factory.CreateFileSystem();
var vfs = factory.CreateFileSystem();

// Display a banner
AnsiConsole.Write(
Expand Down
4 changes: 2 additions & 2 deletions Atypical.VirtualFileSystem.DemoCli/TreeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ public static class TreeExtensions
/// <param name="directoryNode">The directory node to use as the source</param>
public static void FillTree(this Tree treeNode, IDirectoryNode directoryNode)
{
foreach (IDirectoryNode dir in directoryNode.Directories)
foreach (var dir in directoryNode.Directories)
{
var tree = new Tree(dir.Name);
treeNode.AddNode(tree);
FillTree(tree, dir); // Call FillTree recursively for subdirectories
}

foreach (IFileNode file in directoryNode.Files)
foreach (var file in directoryNode.Files)
{
var tree = new Tree(file.Name);
treeNode.AddNode(tree);
Expand Down

0 comments on commit b4b5bb7

Please sign in to comment.