-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #254 from JoeBiellik/cleanup
Cleanup
- Loading branch information
Showing
3 changed files
with
5 additions
and
74 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,20 @@ | ||
// | ||
// Main website for TVRename is http://tvrename.com | ||
// | ||
// Source code available at http://code.google.com/p/tvrename/ | ||
// | ||
// This code is released under GPLv3 http://www.gnu.org/licenses/gpl.html | ||
// | ||
|
||
using System; | ||
using System.Linq; | ||
using System.Reflection; | ||
|
||
namespace TVRename | ||
{ | ||
// What version are we? | ||
// Are we running under Mono, rather than MS.NET ? | ||
public static class Version | ||
{ | ||
private static bool? OnMonoCached; | ||
|
||
public static bool OnMono() | ||
{ | ||
if (!OnMonoCached.HasValue) | ||
OnMonoCached = Type.GetType("Mono.Runtime") != null; | ||
return OnMonoCached.Value; | ||
} | ||
|
||
public static bool OnWindows() | ||
{ | ||
return Environment.OSVersion.Platform == PlatformID.Win32NT; | ||
} | ||
|
||
public static bool OnMono() => Type.GetType("Mono.Runtime") != null; | ||
|
||
public static string DisplayVersionString() | ||
{ | ||
|
||
string v = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute), false).Cast<AssemblyInformationalVersionAttribute>().First().InformationalVersion; | ||
#if DEBUG | ||
v += " ** Debug Build **"; | ||
#endif | ||
return v; | ||
|
||
} | ||
} | ||
} |
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