-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: search current working directory for project file if not specif…
…ied (#69) Co-authored-by: Eva Ditzelmüller <87754804+EvaDitzelmueller@users.noreply.github.com>
- Loading branch information
1 parent
ba90207
commit e5a9937
Showing
12 changed files
with
245 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/libraries/FlashOWare.Tool.Cli/IO/FileSystemAccessor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace FlashOWare.Tool.Cli.IO; | ||
|
||
internal sealed class FileSystemAccessor : IFileSystemAccessor | ||
{ | ||
public static FileSystemAccessor System { get; } = new FileSystemAccessor(); | ||
|
||
private FileSystemAccessor() | ||
{ | ||
} | ||
|
||
public DirectoryInfo GetCurrentDirectory() | ||
{ | ||
string currentDirectory = Directory.GetCurrentDirectory(); | ||
return new DirectoryInfo(currentDirectory); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace FlashOWare.Tool.Cli.IO; | ||
|
||
public interface IFileSystemAccessor | ||
{ | ||
DirectoryInfo GetCurrentDirectory(); | ||
} |
18 changes: 18 additions & 0 deletions
18
src/tests/FlashOWare.Tool.Cli.Tests/IO/FileSystemAccessor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using FlashOWare.Tool.Cli.IO; | ||
|
||
namespace FlashOWare.Tool.Cli.Tests.IO; | ||
|
||
internal sealed class FileSystemAccessor : IFileSystemAccessor | ||
{ | ||
private readonly DirectoryInfo _directory; | ||
|
||
public FileSystemAccessor(DirectoryInfo directory) | ||
{ | ||
_directory = directory; | ||
} | ||
|
||
public DirectoryInfo GetCurrentDirectory() | ||
{ | ||
return _directory; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.