diff options
author | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2015-02-14 03:45:40 +0300 |
---|---|---|
committer | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2015-02-14 03:45:40 +0300 |
commit | ddde1cd21e7e9c6bcc31bfdce23e531d635b9e04 (patch) | |
tree | f6561b92787cac22082660f37affe1d7c0917c10 /main | |
parent | aa4f4b3c483c41b48efedc0ca44277b1144418b2 (diff) |
[Addins] Introduce PlatformCondition maxVersion
Diffstat (limited to 'main')
-rw-r--r-- | main/src/core/MonoDevelop.Core/MonoDevelop.Core.AddIns/PlatformCondition.cs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.AddIns/PlatformCondition.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.AddIns/PlatformCondition.cs index a4a0372093..bab662073b 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core.AddIns/PlatformCondition.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core.AddIns/PlatformCondition.cs @@ -59,6 +59,9 @@ namespace MonoDevelop.Core.AddIns if (Version.TryParse (conditionNode.GetAttribute ("minVersion"), out version)) result |= (Platform.IsMac ? MacSystemInformation.OsVersion : Environment.OSVersion.Version) >= version; + if (Version.TryParse (conditionNode.GetAttribute ("maxVersion"), out version)) + result |= (Platform.IsMac ? MacSystemInformation.OsVersion : Environment.OSVersion.Version) <= version; + return negate ? !result : result; } } |