You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by pt...@apache.org on 2017/05/31 09:11:06 UTC
ignite git commit: IGNITE-5354 .NET: Fix command line args preference
over config file
Repository: ignite
Updated Branches:
refs/heads/master e36c02ceb -> 8476a1958
IGNITE-5354 .NET: Fix command line args preference over config file
This closes #2042
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/8476a195
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/8476a195
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/8476a195
Branch: refs/heads/master
Commit: 8476a1958a1778a6b48dea55a81e8e954f243179
Parents: e36c02c
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Wed May 31 12:10:58 2017 +0300
Committer: Pavel Tupitsyn <pt...@apache.org>
Committed: Wed May 31 12:10:58 2017 +0300
----------------------------------------------------------------------
.../platforms/dotnet/Apache.Ignite/Config/Configurator.cs | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/8476a195/modules/platforms/dotnet/Apache.Ignite/Config/Configurator.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite/Config/Configurator.cs b/modules/platforms/dotnet/Apache.Ignite/Config/Configurator.cs
index 785334a..4c43841 100644
--- a/modules/platforms/dotnet/Apache.Ignite/Config/Configurator.cs
+++ b/modules/platforms/dotnet/Apache.Ignite/Config/Configurator.cs
@@ -176,9 +176,12 @@ namespace Apache.Ignite.Config
/// </summary>
private static string FindValue(IEnumerable<Tuple<string, string>> args, string name)
{
- return args.Where(x => name.Equals(x.Item1, StringComparison.OrdinalIgnoreCase))
- .Select(x => x.Item2)
- .FirstOrDefault();
+ // Search in reverse so that command line has preference over config file.
+ return args
+ .Reverse()
+ .Where(x => name.Equals(x.Item1, StringComparison.OrdinalIgnoreCase))
+ .Select(x => x.Item2)
+ .FirstOrDefault();
}
}
}