-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2.1.0: * feature: you can move projects to different folders now instead of just renaming them * feature: you can specify a directory to exclude from project reference updates * feature: the detected VS solution folder is displayed in review * feature: the detected git version is displayed in review * bugfix: when called with unnamed arguments, old project name now is understood to come before new project name (before it was the wrong way round) * bugfix: VS solution folders containing spaces don't crash the tool anymore
- Loading branch information
1 parent
9934053
commit b167670
Showing
12 changed files
with
1,429 additions
and
109 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 was deleted.
Oops, something went wrong.
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,26 @@ | ||
using System.IO; | ||
using System.Text; | ||
|
||
namespace ModernRonin.ProjectRenamer | ||
{ | ||
public static class CommonExtensions | ||
{ | ||
public static string AsText(this bool self) => self ? "yes" : "no"; | ||
|
||
public static bool IsDirectorySeparator(this char self) => | ||
self == Path.DirectorySeparatorChar || self == Path.AltDirectorySeparatorChar; | ||
|
||
public static string Repeat(this string self, int count) | ||
{ | ||
var result = new StringBuilder(self.Length * count); | ||
for (var i = 0; i < count; ++i) result.Append(self); | ||
return result.ToString(); | ||
} | ||
|
||
public static string ToAbsolutePath(this string self, string baseDirectory) => | ||
Path.GetFullPath(self, baseDirectory); | ||
|
||
public static string ToRelativePath(this string self, string baseDirectory) => | ||
Path.GetRelativePath(baseDirectory, self); | ||
} | ||
} |
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.