forked from ktvoelker/di
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made FileQuery and FileChooser system generic over IFileQueryables
- Loading branch information
Showing
13 changed files
with
242 additions
and
56 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// Directory.cs | ||
// | ||
// Author: | ||
// Karl Voelker <[email protected]> | ||
// | ||
// Copyright (c) 2011 Karl Voelker | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
using System; | ||
namespace Di.Model.Language | ||
{ | ||
public class Directory : Base | ||
{ | ||
public Directory() | ||
{ | ||
Name = "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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
// | ||
// ProjectDirectory.cs | ||
// | ||
// Author: | ||
// Karl Voelker <[email protected]> | ||
// | ||
// Copyright (c) 2011 Karl Voelker | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU General Public License | ||
// along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
using System; | ||
using System.IO; | ||
namespace Di.Model | ||
{ | ||
public class ProjectDirectory : IFileQueryable | ||
{ | ||
private static readonly Language.Base LangInstance = new Language.Directory(); | ||
|
||
public Project Root | ||
{ | ||
get; | ||
private set; | ||
} | ||
|
||
public ProjectDirectory Parent | ||
{ | ||
get; | ||
private set; | ||
} | ||
|
||
public DirectoryInfo Directory | ||
{ | ||
get; | ||
private set; | ||
} | ||
|
||
public Language.Base Lang | ||
{ | ||
get | ||
{ | ||
return LangInstance; | ||
} | ||
} | ||
|
||
public string Name | ||
{ | ||
get | ||
{ | ||
return Directory.Name; | ||
} | ||
} | ||
|
||
public string FullName | ||
{ | ||
get | ||
{ | ||
return Directory.FullName; | ||
} | ||
} | ||
|
||
public string ProjectRelativeFullName | ||
{ | ||
get { return Directory.FullName.Substring(Root.Root.FullName.Length + 1); } | ||
} | ||
|
||
public ProjectDirectory(Project root, ProjectDirectory parent, DirectoryInfo dir) | ||
{ | ||
Root = root; | ||
Parent = parent; | ||
Directory = dir; | ||
} | ||
} | ||
} | ||
|
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.