You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2016/08/03 11:29:04 UTC

[22/48] ignite git commit: IGNITE-3427 .NET: Moved examples from Spring XML to app.config. This closes #897.

IGNITE-3427 .NET: Moved examples from Spring XML to app.config. This closes #897.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/fa81b4a9
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/fa81b4a9
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/fa81b4a9

Branch: refs/heads/ignite-3443
Commit: fa81b4a90f527bae638009e19ad9d4131c6a6dad
Parents: 8386dd8
Author: Pavel Tupitsyn <pt...@apache.org>
Authored: Thu Jul 28 16:17:06 2016 +0300
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Thu Jul 28 16:17:06 2016 +0300

----------------------------------------------------------------------
 .../Apache.Ignite.Core.Tests.csproj             |   1 +
 .../Examples/Example.cs                         |   8 +-
 .../Examples/ExamplesTest.cs                    |  46 ++++-----
 .../Examples/PathUtil.cs                        |  10 +-
 .../Examples/ProjectFilesTest.cs                |   2 +-
 .../Apache.Ignite.Core.Tests/TestAppConfig.cs   | 100 +++++++++++++++++++
 .../Multicast/TcpDiscoveryMulticastIpFinder.cs  |   7 ++
 .../dotnet/Apache.Ignite.Core/Ignition.cs       |   9 +-
 modules/platforms/dotnet/Apache.Ignite.sln      |   1 -
 .../dotnet/examples/Apache.Ignite.Examples.sln  |   8 --
 .../examples/Apache.Ignite.Examples/App.config  |  33 +++++-
 .../Compute/ClosureExample.cs                   |   4 +-
 .../Compute/TaskExample.cs                      |   4 +-
 .../Datagrid/ContinuousQueryExample.cs          |   4 +-
 .../Datagrid/DataStreamerExample.cs             |   4 +-
 .../Datagrid/LinqExample.cs                     |   4 +-
 .../Datagrid/PutGetExample.cs                   |   4 +-
 .../Datagrid/QueryExample.cs                    |   4 +-
 .../Datagrid/StoreExample.cs                    |   4 +-
 .../Datagrid/TransactionExample.cs              |   4 +-
 .../Events/EventsExample.cs                     |   6 +-
 .../Messaging/MessagingExample.cs               |   4 +-
 .../Misc/LifecycleExample.cs                    |  13 ++-
 .../Services/ServicesExample.cs                 |   4 +-
 .../dotnet/examples/Config/examples-config.xml  |  98 ------------------
 25 files changed, 210 insertions(+), 176 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
index 4e33a91..95fea8f 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Apache.Ignite.Core.Tests.csproj
@@ -54,6 +54,7 @@
     <Reference Include="System.XML" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="TestAppConfig.cs" />
     <Compile Include="AspNet\IgniteOutputCacheProviderTest.cs" />
     <Compile Include="Binary\BinaryBuilderSelfTestFullFooter.cs" />
     <Compile Include="Binary\BinaryCompactFooterInteropTest.cs" />

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/Example.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/Example.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/Example.cs
index e532360..663711c 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/Example.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/Example.cs
@@ -35,7 +35,7 @@ namespace Apache.Ignite.Core.Tests.Examples
         private Action _runAction;
 
         /** Config url */
-        public string SpringConfigUrl { get; private set; }
+        public string ConfigPath { get; private set; }
 
         /** Source path */
         public string SourceFilePath { get; private set; }
@@ -90,7 +90,7 @@ namespace Apache.Ignite.Core.Tests.Examples
                 yield return new Example
                 {
                     SourceFilePath = sourceFile,
-                    SpringConfigUrl = GetSpringConfigUrl(sourceCode),
+                    ConfigPath = GetConfigPath(sourceCode),
                     NeedsTestDll = sourceCode.Contains(examplesDllName),
                     _runAction = GetRunAction(type),
                     Name = type.Name
@@ -109,9 +109,9 @@ namespace Apache.Ignite.Core.Tests.Examples
         /// <summary>
         /// Gets the spring configuration URL.
         /// </summary>
-        private static string GetSpringConfigUrl(string code)
+        private static string GetConfigPath(string code)
         {
-            var match = Regex.Match(code, "-springConfigUrl=(.*?.xml)");
+            var match = Regex.Match(code, "-configFileName=(.*?.config)");
 
             return match.Success ? match.Groups[1].Value : null;
         }

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ExamplesTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ExamplesTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ExamplesTest.cs
index 7cf0d57..02a5d0b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ExamplesTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ExamplesTest.cs
@@ -30,6 +30,9 @@ namespace Apache.Ignite.Core.Tests.Examples
     [Category(TestUtils.CategoryIntensive)]
     public class ExamplesTest
     {
+        /** */
+        private IDisposable _changedConfig;
+
         /// <summary>
         /// Tests the example in a single node mode.
         /// </summary>
@@ -68,24 +71,14 @@ namespace Apache.Ignite.Core.Tests.Examples
         private static void TestRemoteNodes(Example example, bool clientMode)
         {
             // Exclude LifecycleExample
-            if (string.IsNullOrEmpty(example.SpringConfigUrl))
+            if (string.IsNullOrEmpty(example.ConfigPath))
             {
                 Assert.AreEqual("LifecycleExample", example.Name);
 
                 return;
             }
 
-            // First node to start in current process defines JVM options.
-            var gridConfig = new IgniteConfiguration
-            {
-                SpringConfigUrl = example.SpringConfigUrl,
-                JvmOptions =
-                    new[]
-                    {
-                        "-Xms512m", "-Xmx1024m", "-Xdebug", "-Xnoagent", "-Djava.compiler=NONE",
-                        "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
-                    }
-            };
+            var configPath = Path.Combine(PathUtil.IgniteHome, PathUtil.DevPrefix, example.ConfigPath);
 
             // Try with multiple standalone nodes
             for (var i = 0; i < 2; i++)
@@ -94,9 +87,10 @@ namespace Apache.Ignite.Core.Tests.Examples
                 // Stop it after topology check so we don't interfere with example
                 Ignition.ClientMode = false;
 
-                using (var ignite = Ignition.Start(gridConfig))
+                using (var ignite = Ignition.StartFromApplicationConfiguration(
+                    "igniteConfiguration", configPath))
                 {
-                    var args = new List<string> {"-springConfigUrl=" + example.SpringConfigUrl};
+                    var args = new List<string> { "-configFileName=" + configPath};
 
                     if (example.NeedsTestDll)
                         args.Add(" -assembly=" + typeof(AverageSalaryJob).Assembly.Location);
@@ -122,34 +116,36 @@ namespace Apache.Ignite.Core.Tests.Examples
         public void FixtureSetUp()
         {
             Environment.SetEnvironmentVariable("IGNITE_NATIVE_TEST_CLASSPATH", "true");
-            Environment.SetEnvironmentVariable(Ignition.EnvIgniteSpringConfigUrlPrefix, 
-                PathUtil.SpringConfigUrlDevPrefix);
 
             Directory.SetCurrentDirectory(PathUtil.IgniteHome);
+
+            _changedConfig = TestAppConfig.Change(PathUtil.ExamplesAppConfigPath);
         }
 
         /// <summary>
-        /// Test teardown.
+        /// Fixture teardown.
         /// </summary>
-        [TearDown]
-        public void TearDown()
+        [TestFixtureTearDown]
+        public void FixtureTearDown()
         {
-            Ignition.ClientMode = false;
-            IgniteProcess.KillAll();
+            _changedConfig.Dispose();
         }
 
         /// <summary>
-        /// Fixture tear down.
+        /// Test teardown.
         /// </summary>
-        [TestFixtureTearDown]
-        public void FixtureTearDown()
+        [TearDown]
+        public void TearDown()
         {
-            Environment.SetEnvironmentVariable(Ignition.EnvIgniteSpringConfigUrlPrefix, null);
+            Ignition.ClientMode = false;
+            IgniteProcess.KillAll();
         }
 
         /// <summary>
         /// Gets the test cases.
         /// </summary>
+        // ReSharper disable once MemberCanBePrivate.Global
+        // ReSharper disable once MemberCanBeMadeStatic.Global
         public IEnumerable<Example> TestCases
         {
             get { return Example.GetExamples(); }

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/PathUtil.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/PathUtil.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/PathUtil.cs
index a128b7d..7c82d80 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/PathUtil.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/PathUtil.cs
@@ -25,7 +25,7 @@ namespace Apache.Ignite.Core.Tests.Examples
     public static class PathUtil
     {
         /** */
-        public const string SpringConfigUrlDevPrefix = "modules\\";
+        public const string DevPrefix = "modules\\";
 
         /** */
         public static readonly string IgniteHome = Impl.Common.IgniteHome.Resolve(null);
@@ -37,6 +37,12 @@ namespace Apache.Ignite.Core.Tests.Examples
             Path.Combine(IgniteHome, @"modules\platforms\dotnet\examples");
 
         /// <summary>
+        /// Examples application configuration path.
+        /// </summary>
+        public static readonly string ExamplesAppConfigPath =
+            Path.Combine(ExamplesSourcePath, @"Apache.Ignite.Examples\App.config");
+
+        /// <summary>
         /// Gets the full configuration path.
         /// </summary>
         public static string GetFullConfigPath(string springConfigUrl)
@@ -44,7 +50,7 @@ namespace Apache.Ignite.Core.Tests.Examples
             if (string.IsNullOrEmpty(springConfigUrl))
                 return springConfigUrl;
 
-            return Path.GetFullPath(Path.Combine(IgniteHome, SpringConfigUrlDevPrefix + springConfigUrl));
+            return Path.GetFullPath(Path.Combine(IgniteHome, DevPrefix + springConfigUrl));
         }
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ProjectFilesTest.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ProjectFilesTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ProjectFilesTest.cs
index b99b54e..3f87217 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ProjectFilesTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Examples/ProjectFilesTest.cs
@@ -35,7 +35,7 @@ namespace Apache.Ignite.Core.Tests.Examples
         {
             var paths = Directory.GetFiles(PathUtil.ExamplesSourcePath, "*.cs", SearchOption.AllDirectories)
                 .Select(File.ReadAllText)
-                .SelectMany(src => Regex.Matches(src, @"platforms[^\s]+.xml").OfType<Match>())
+                .SelectMany(src => Regex.Matches(src, @"platforms[^\s]+.config").OfType<Match>())
                 .Where(match => match.Success)
                 .Select(match => PathUtil.GetFullConfigPath(match.Value))
                 .Distinct()

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/Apache.Ignite.Core.Tests/TestAppConfig.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/TestAppConfig.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/TestAppConfig.cs
new file mode 100644
index 0000000..094aee5
--- /dev/null
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/TestAppConfig.cs
@@ -0,0 +1,100 @@
+\ufeff/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace Apache.Ignite.Core.Tests
+{
+    using System;
+    using System.Linq;
+    using System.Configuration;
+    using System.Reflection;
+
+    /// <summary>
+    /// Replaces app.config at runtime for test purposes.
+    /// </summary>
+    public static class TestAppConfig
+    {
+        /// <summary>
+        /// Changes the current app config with the specified one.
+        /// </summary>
+        /// <param name="path">The path.</param>
+        /// <returns>Disposable object that will revert the change when disposed.</returns>
+        public static IDisposable Change(string path)
+        {
+            return new ChangeAppConfig(path);
+        }
+
+        /// <summary>
+        /// Disposable config changer.
+        /// </summary>
+        private class ChangeAppConfig : IDisposable
+        {
+            /** */
+            private readonly string _oldConfig =
+                AppDomain.CurrentDomain.GetData("APP_CONFIG_FILE").ToString();
+
+            /** */
+            private bool _isDisposed;
+
+            /// <summary>
+            /// Initializes a new instance of the <see cref="ChangeAppConfig"/> class.
+            /// </summary>
+            /// <param name="path">The path.</param>
+            public ChangeAppConfig(string path)
+            {
+                AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE", path);
+                ResetConfigMechanism();
+            }
+
+            /** <inheritdoc /> */
+            public void Dispose()
+            {
+                if (!_isDisposed)
+                {
+                    AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE", _oldConfig);
+                    ResetConfigMechanism();
+
+
+                    _isDisposed = true;
+                }
+                GC.SuppressFinalize(this);
+            }
+
+            /// <summary>
+            /// Resets the internal configuration mechanism.
+            /// </summary>
+            private static void ResetConfigMechanism()
+            {
+                // ReSharper disable PossibleNullReferenceException
+
+                typeof(ConfigurationManager)
+                    .GetField("s_initState", BindingFlags.NonPublic | BindingFlags.Static)
+                    .SetValue(null, 0);
+
+                typeof(ConfigurationManager)
+                    .GetField("s_configSystem", BindingFlags.NonPublic | BindingFlags.Static)
+                    .SetValue(null, null);
+
+                typeof(ConfigurationManager)
+                    .Assembly.GetTypes().First(x => x.FullName == "System.Configuration.ClientConfigPaths")
+                    .GetField("s_current", BindingFlags.NonPublic | BindingFlags.Static)
+                    .SetValue(null, null);
+                
+                // ReSharper restore PossibleNullReferenceException
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/Apache.Ignite.Core/Discovery/Tcp/Multicast/TcpDiscoveryMulticastIpFinder.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Discovery/Tcp/Multicast/TcpDiscoveryMulticastIpFinder.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Discovery/Tcp/Multicast/TcpDiscoveryMulticastIpFinder.cs
index 4581a04..b1cb719 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Discovery/Tcp/Multicast/TcpDiscoveryMulticastIpFinder.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Discovery/Tcp/Multicast/TcpDiscoveryMulticastIpFinder.cs
@@ -41,6 +41,11 @@ namespace Apache.Ignite.Core.Discovery.Tcp.Multicast
         public const int DefaultAddressRequestAttempts = 2;
 
         /// <summary>
+        /// Default multicast group.
+        /// </summary>
+        public const string DefaultMulticastGroup = "228.1.2.4";
+
+        /// <summary>
         /// Default response timeout.
         /// </summary>
         public static readonly TimeSpan DefaultResponseTimeout = TimeSpan.FromMilliseconds(500);
@@ -53,6 +58,7 @@ namespace Apache.Ignite.Core.Discovery.Tcp.Multicast
             MulticastPort = DefaultMulticastPort;
             AddressRequestAttempts = DefaultAddressRequestAttempts;
             ResponseTimeout = DefaultResponseTimeout;
+            MulticastGroup = DefaultMulticastGroup;
         }
 
         /// <summary>
@@ -66,6 +72,7 @@ namespace Apache.Ignite.Core.Discovery.Tcp.Multicast
         /// <summary>
         /// Gets or sets the IP address of the multicast group.
         /// </summary>
+        [DefaultValue(DefaultMulticastGroup)]
         public string MulticastGroup { get; set; }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
index c9ff3ff..552a7f2 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Ignition.cs
@@ -52,9 +52,6 @@ namespace Apache.Ignite.Core
     public static class Ignition
     {
         /** */
-        internal const string EnvIgniteSpringConfigUrlPrefix = "IGNITE_SPRING_CONFIG_URL_PREFIX";
-
-        /** */
         private static readonly object SyncRoot = new object();
 
         /** GC warning flag. */
@@ -216,10 +213,6 @@ namespace Apache.Ignite.Core
 
                 var gridName = cfg.GridName;
 
-                var cfgPath = cfg.SpringConfigUrl == null 
-                    ? null 
-                    : Environment.GetEnvironmentVariable(EnvIgniteSpringConfigUrlPrefix) + cfg.SpringConfigUrl;
-
                 // 3. Create startup object which will guide us through the rest of the process.
                 _startup = new Startup(cfg, cbs);
 
@@ -228,7 +221,7 @@ namespace Apache.Ignite.Core
                 try
                 {
                     // 4. Initiate Ignite start.
-                    UU.IgnitionStart(cbs.Context, cfgPath, gridName, ClientMode);
+                    UU.IgnitionStart(cbs.Context, cfg.SpringConfigUrl, gridName, ClientMode);
 
                     // 5. At this point start routine is finished. We expect STARTUP object to have all necessary data.
                     var node = _startup.Ignite;

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/Apache.Ignite.sln
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.sln b/modules/platforms/dotnet/Apache.Ignite.sln
index ca4f9c4..2362ce2 100644
--- a/modules/platforms/dotnet/Apache.Ignite.sln
+++ b/modules/platforms/dotnet/Apache.Ignite.sln
@@ -27,7 +27,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
 		Apache.Ignite.sln.DotSettings = Apache.Ignite.sln.DotSettings
 		Apache.Ignite.sln.TeamCity.DotSettings = Apache.Ignite.sln.TeamCity.DotSettings
 		DEVNOTES.txt = DEVNOTES.txt
-		examples\Config\examples-config.xml = examples\Config\examples-config.xml
 		README.txt = README.txt
 	EndProjectSection
 EndProject

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/examples/Apache.Ignite.Examples.sln
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples.sln b/modules/platforms/dotnet/examples/Apache.Ignite.Examples.sln
index 1254245..c88d698 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples.sln
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples.sln
@@ -5,14 +5,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Ignite.Examples", "A
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Apache.Ignite.ExamplesDll", "Apache.Ignite.ExamplesDll\Apache.Ignite.ExamplesDll.csproj", "{DFB08363-202E-412D-8812-349EF10A8702}"
 EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Config", "Config", "{F1491682-C798-4C23-8239-16C5BC2C5A02}"
-	ProjectSection(SolutionItems) = preProject
-		Config\example-cache-query.xml = Config\example-cache-query.xml
-		Config\example-cache-store.xml = Config\example-cache-store.xml
-		Config\example-cache.xml = Config\example-cache.xml
-		Config\example-compute.xml = Config\example-compute.xml
-	EndProjectSection
-EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/examples/Apache.Ignite.Examples/App.config
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/App.config b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/App.config
index 8e69aeb..1d180e8 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/App.config
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/App.config
@@ -18,7 +18,34 @@
 -->
 
 <configuration>
-  <runtime>
-    <gcServer enabled="true" />
-  </runtime>
+    <configSections>
+        <section name="igniteConfiguration" type="Apache.Ignite.Core.IgniteConfigurationSection, Apache.Ignite.Core" />
+    </configSections>
+    
+    <runtime>
+        <gcServer enabled="true" />
+    </runtime>
+
+    <igniteConfiguration xmlns="http://ignite.apache.org/schema/dotnet/IgniteConfigurationSection">
+        <binaryConfiguration>
+            <typeConfigurations>
+                <binaryTypeConfiguration typeName="Apache.Ignite.ExamplesDll.Binary.OrganizationType" isEnum="true" />
+            </typeConfigurations>
+            <types>
+                <string>Apache.Ignite.ExamplesDll.Binary.Account</string>
+                <string>Apache.Ignite.ExamplesDll.Binary.Address</string>
+                <string>Apache.Ignite.ExamplesDll.Binary.Employee</string>
+                <string>Apache.Ignite.ExamplesDll.Binary.EmployeeKey</string>
+                <string>Apache.Ignite.ExamplesDll.Binary.Organization</string>
+            </types>
+        </binaryConfiguration>
+        
+        <discoverySpi type="TcpDiscoverySpi">
+            <ipFinder type="TcpDiscoveryMulticastIpFinder">
+                <endpoints>
+                    <string>127.0.0.1:47500</string>
+                </endpoints>
+            </ipFinder>
+        </discoverySpi>
+    </igniteConfiguration>
 </configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/ClosureExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/ClosureExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/ClosureExample.cs
index 875696b..34e32b9 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/ClosureExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/ClosureExample.cs
@@ -34,7 +34,7 @@ namespace Apache.Ignite.Examples.Compute
     /// <para />
     /// This example can be run with standalone Apache Ignite.NET node:
     /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
-    /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\examples-config.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
+    /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
     /// 2) Start example.
     /// </summary>
     public class ClosureExample
@@ -45,7 +45,7 @@ namespace Apache.Ignite.Examples.Compute
         [STAThread]
         public static void Main()
         {
-            using (var ignite = Ignition.Start(@"platforms\dotnet\examples\config\examples-config.xml"))
+            using (var ignite = Ignition.StartFromApplicationConfiguration())
             {
                 Console.WriteLine();
                 Console.WriteLine(">>> Closure execution example started.");

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/TaskExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/TaskExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/TaskExample.cs
index d9f45f9..a7873cb 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/TaskExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Compute/TaskExample.cs
@@ -34,7 +34,7 @@ namespace Apache.Ignite.Examples.Compute
     /// <para />
     /// This example can be run with standalone Apache Ignite.NET node:
     /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
-    /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\examples-config.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
+    /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
     /// 2) Start example.
     /// </summary>
     public class TaskExample
@@ -45,7 +45,7 @@ namespace Apache.Ignite.Examples.Compute
         [STAThread]
         public static void Main()
         {
-            using (var ignite = Ignition.Start(@"platforms\dotnet\examples\config\examples-config.xml"))
+            using (var ignite = Ignition.StartFromApplicationConfiguration())
             {
                 Console.WriteLine();
                 Console.WriteLine(">>> Task execution example started.");

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/ContinuousQueryExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/ContinuousQueryExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/ContinuousQueryExample.cs
index 6bdb33f..e3fc583 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/ContinuousQueryExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/ContinuousQueryExample.cs
@@ -36,7 +36,7 @@ namespace Apache.Ignite.Examples.Datagrid
     /// <para />
     /// This example can be run with standalone Apache Ignite.NET node:
     /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
-    /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\examples-config.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
+    /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
     /// 2) Start example.
     /// </summary>
     public class ContinuousQueryExample
@@ -50,7 +50,7 @@ namespace Apache.Ignite.Examples.Datagrid
         [STAThread]
         public static void Main()
         {
-            using (var ignite = Ignition.Start(@"platforms\dotnet\examples\config\examples-config.xml"))
+            using (var ignite = Ignition.StartFromApplicationConfiguration())
             {
                 Console.WriteLine();
                 Console.WriteLine(">>> Cache continuous query example started.");

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/DataStreamerExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/DataStreamerExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/DataStreamerExample.cs
index 25d4e8e..88a0529 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/DataStreamerExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/DataStreamerExample.cs
@@ -36,7 +36,7 @@ namespace Apache.Ignite.Examples.Datagrid
     /// <para />
     /// This example can be run with standalone Apache Ignite.NET node:
     /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
-    /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\examples-config.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
+    /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
     /// 2) Start example.
     /// </summary>
     public class DataStreamerExample
@@ -53,7 +53,7 @@ namespace Apache.Ignite.Examples.Datagrid
         [STAThread]
         public static void Main()
         {
-            using (var ignite = Ignition.Start(@"platforms\dotnet\examples\config\examples-config.xml"))
+            using (var ignite = Ignition.StartFromApplicationConfiguration())
             {
                 Console.WriteLine();
                 Console.WriteLine(">>> Cache data streamer example started.");

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
index 49611cf..b4a8493 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/LinqExample.cs
@@ -39,7 +39,7 @@ namespace Apache.Ignite.Examples.Datagrid
     /// <para />
     /// This example can be run with standalone Apache Ignite.NET node:
     /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
-    /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\examples-config.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
+    /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
     /// 2) Start example.
     /// </summary>
     public class LinqExample
@@ -50,7 +50,7 @@ namespace Apache.Ignite.Examples.Datagrid
         [STAThread]
         public static void Main()
         {
-            using (var ignite = Ignition.Start(@"platforms\dotnet\examples\config\examples-config.xml"))
+            using (var ignite = Ignition.StartFromApplicationConfiguration())
             {
                 Console.WriteLine();
                 Console.WriteLine(">>> Cache LINQ example started.");

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/PutGetExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/PutGetExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/PutGetExample.cs
index 10c6e1b..ebf77ec 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/PutGetExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/PutGetExample.cs
@@ -37,7 +37,7 @@ namespace Apache.Ignite.Examples.Datagrid
     /// <para />
     /// This example can be run with standalone Apache Ignite.NET node:
     /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
-    /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\examples-config.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
+    /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
     /// 2) Start example.
     /// </summary>
     public class PutGetExample
@@ -51,7 +51,7 @@ namespace Apache.Ignite.Examples.Datagrid
         [STAThread]
         public static void Main()
         {
-            using (var ignite = Ignition.Start(@"platforms\dotnet\examples\config\examples-config.xml"))
+            using (var ignite = Ignition.StartFromApplicationConfiguration())
             {
                 Console.WriteLine();
                 Console.WriteLine(">>> Cache put-get example started.");

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/QueryExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/QueryExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/QueryExample.cs
index c08a78b..7880eac 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/QueryExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/QueryExample.cs
@@ -38,7 +38,7 @@ namespace Apache.Ignite.Examples.Datagrid
     /// <para />
     /// This example can be run with standalone Apache Ignite.NET node:
     /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
-    /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\examples-config.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
+    /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
     /// 2) Start example.
     /// </summary>
     public class QueryExample
@@ -49,7 +49,7 @@ namespace Apache.Ignite.Examples.Datagrid
         [STAThread]
         public static void Main()
         {
-            using (var ignite = Ignition.Start(@"platforms\dotnet\examples\config\examples-config.xml"))
+            using (var ignite = Ignition.StartFromApplicationConfiguration())
             {
                 Console.WriteLine();
                 Console.WriteLine(">>> Cache query example started.");

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/StoreExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/StoreExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/StoreExample.cs
index c95b01d..25721b8 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/StoreExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/StoreExample.cs
@@ -35,7 +35,7 @@ namespace Apache.Ignite.Examples.Datagrid
     /// <para />
     /// This example can be run with standalone Apache Ignite.NET node:
     /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
-    /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\examples-config.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
+    /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
     /// 2) Start example.
     /// </summary>
     class StoreExample
@@ -49,7 +49,7 @@ namespace Apache.Ignite.Examples.Datagrid
         [STAThread]
         public static void Main()
         {
-            using (var ignite = Ignition.Start(@"platforms\dotnet\examples\config\examples-config.xml"))
+            using (var ignite = Ignition.StartFromApplicationConfiguration())
             {
                 Console.WriteLine();
                 Console.WriteLine(">>> Cache store example started.");

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/TransactionExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/TransactionExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/TransactionExample.cs
index 46f871f..b0e953c 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/TransactionExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Datagrid/TransactionExample.cs
@@ -34,7 +34,7 @@ namespace Apache.Ignite.Examples.Datagrid
     /// <para />
     /// This example can be run with standalone Apache Ignite.NET node:
     /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
-    /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\examples-config.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
+    /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
     /// 2) Start example.
     /// </summary>
     class TransactionExample
@@ -48,7 +48,7 @@ namespace Apache.Ignite.Examples.Datagrid
         [STAThread]
         public static void Main()
         {
-            using (var ignite = Ignition.Start(@"platforms\dotnet\examples\config\examples-config.xml"))
+            using (var ignite = Ignition.StartFromApplicationConfiguration())
             {
                 Console.WriteLine();
                 Console.WriteLine(">>> Transaction example started.");

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Events/EventsExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Events/EventsExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Events/EventsExample.cs
index b19d646..3b804f6 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Events/EventsExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Events/EventsExample.cs
@@ -36,7 +36,7 @@ namespace Apache.Ignite.Examples.Events
     /// <para />
     /// This example can be run with standalone Apache Ignite.NET node:
     /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
-    /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\examples-config.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
+    /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
     /// 2) Start example.
     /// </summary>
     public class EventsExample
@@ -47,7 +47,7 @@ namespace Apache.Ignite.Examples.Events
         [STAThread]
         public static void Main()
         {
-            using (var ignite = Ignition.Start(@"platforms\dotnet\examples\config\examples-config.xml"))
+            using (var ignite = Ignition.StartFromApplicationConfiguration())
             {
                 Console.WriteLine(">>> Events example started.");
                 Console.WriteLine();
@@ -55,6 +55,8 @@ namespace Apache.Ignite.Examples.Events
                 // Local listen example
                 Console.WriteLine(">>> Listening for a local event...");
 
+                ignite.GetEvents().EnableLocal(EventType.TaskExecutionAll);
+
                 var listener = new LocalListener();
                 ignite.GetEvents().LocalListen(listener, EventType.TaskExecutionAll);
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Messaging/MessagingExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Messaging/MessagingExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Messaging/MessagingExample.cs
index cf94d79..be267df 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Messaging/MessagingExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Messaging/MessagingExample.cs
@@ -28,7 +28,7 @@ namespace Apache.Ignite.Examples.Messaging
     /// 1) Build the project Apache.Ignite.ExamplesDll (select it -> right-click -> Build).
     ///    Apache.Ignite.ExamplesDll.dll must appear in %IGNITE_HOME%/platforms/dotnet/examples/Apache.Ignite.ExamplesDll/bin/${Platform]/${Configuration} folder;
     /// 2) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
-    /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\examples-config.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
+    /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
     /// 3) Set this class as startup object (Apache.Ignite.Examples project -> right-click -> Properties ->
     ///     Application -> Startup object);
     /// 4) Start example (F5 or Ctrl+F5).
@@ -41,7 +41,7 @@ namespace Apache.Ignite.Examples.Messaging
         [STAThread]
         public static void Main()
         {
-            using (var ignite = Ignition.Start(@"platforms\dotnet\examples\config\examples-config.xml"))
+            using (var ignite = Ignition.StartFromApplicationConfiguration())
             {
                 var remotes = ignite.GetCluster().ForRemotes();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/LifecycleExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/LifecycleExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/LifecycleExample.cs
index e79e729..b7acb61 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/LifecycleExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Misc/LifecycleExample.cs
@@ -23,6 +23,9 @@ using Apache.Ignite.Core.Resource;
 
 namespace Apache.Ignite.Examples.Misc
 {
+    using Apache.Ignite.Core.Discovery.Tcp;
+    using Apache.Ignite.Core.Discovery.Tcp.Static;
+
     /// <summary>
     /// This example shows how to provide your own <see cref="ILifecycleBean"/> implementation
     /// to be able to hook into Apache lifecycle. Example bean will output occurred lifecycle 
@@ -50,8 +53,14 @@ namespace Apache.Ignite.Examples.Misc
 
             var cfg = new IgniteConfiguration
             {
-                SpringConfigUrl = @"platforms\dotnet\examples\config\examples-config.xml",
-                LifecycleBeans = new List<ILifecycleBean> { lifecycleExampleBean }
+                DiscoverySpi = new TcpDiscoverySpi
+                {
+                    IpFinder = new TcpDiscoveryStaticIpFinder
+                    {
+                        Endpoints = new[] {"127.0.0.1:47500"}
+                    }
+                },
+                LifecycleBeans = new List<ILifecycleBean> {lifecycleExampleBean}
             };
 
             // Provide lifecycle bean to configuration.

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs
index ae2dfa8..fcfce14 100644
--- a/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs
+++ b/modules/platforms/dotnet/examples/Apache.Ignite.Examples/Services/ServicesExample.cs
@@ -32,7 +32,7 @@ namespace Apache.Ignite.Examples.Services
     /// <para />
     /// This example can be run with standalone Apache Ignite.NET node:
     /// 1) Run %IGNITE_HOME%/platforms/dotnet/bin/Apache.Ignite.exe:
-    /// Apache.Ignite.exe -IgniteHome="%IGNITE_HOME%" -springConfigUrl=platforms\dotnet\examples\config\examples-config.xml -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
+    /// Apache.Ignite.exe -configFileName=platforms\dotnet\examples\apache.ignite.examples\app.config -assembly=[path_to_Apache.Ignite.ExamplesDll.dll]
     /// 2) Start example.
     /// </summary>
     public class ServicesExample
@@ -43,7 +43,7 @@ namespace Apache.Ignite.Examples.Services
         [STAThread]
         public static void Main()
         {
-            using (var ignite = Ignition.Start(@"platforms\dotnet\examples\config\examples-config.xml"))
+            using (var ignite = Ignition.StartFromApplicationConfiguration())
             {
                 Console.WriteLine(">>> Services example started.");
                 Console.WriteLine();

http://git-wip-us.apache.org/repos/asf/ignite/blob/fa81b4a9/modules/platforms/dotnet/examples/Config/examples-config.xml
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/examples/Config/examples-config.xml b/modules/platforms/dotnet/examples/Config/examples-config.xml
deleted file mode 100644
index 40b7a43..0000000
--- a/modules/platforms/dotnet/examples/Config/examples-config.xml
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-
-<beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:util="http://www.springframework.org/schema/util"
-       xsi:schemaLocation="
-        http://www.springframework.org/schema/beans
-        http://www.springframework.org/schema/beans/spring-beans.xsd
-        http://www.springframework.org/schema/util
-        http://www.springframework.org/schema/util/spring-util.xsd">
-    <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
-        <!-- Explicitly configure TCP discovery SPI to provide list of initial nodes. -->
-        <property name="discoverySpi">
-            <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
-                <property name="ipFinder">
-                    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">
-                        <property name="addresses">
-                            <list>
-                                <!-- In distributed environment, replace with actual host IP address. -->
-                                <value>127.0.0.1:47500</value>
-                            </list>
-                        </property>
-                    </bean>
-                </property>
-            </bean>
-        </property>
-
-        <!-- Configure binarizable types. -->
-        <property name="platformConfiguration">
-            <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetConfiguration">
-                <property name="binaryConfiguration">
-                    <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetBinaryConfiguration">
-                        <property name="types">
-                            <list>
-                                <value>Apache.Ignite.ExamplesDll.Binary.Account</value>
-                                <value>Apache.Ignite.ExamplesDll.Binary.Address</value>
-                                <value>Apache.Ignite.ExamplesDll.Binary.Employee</value>
-                                <value>Apache.Ignite.ExamplesDll.Binary.EmployeeKey</value>
-                                <value>Apache.Ignite.ExamplesDll.Binary.Organization</value>
-                            </list>
-                        </property>
-                        <property name="typesConfiguration">
-                            <list>
-                                <bean class="org.apache.ignite.platform.dotnet.PlatformDotNetBinaryTypeConfiguration">
-                                    <property name="typeName" value="Apache.Ignite.ExamplesDll.Binary.OrganizationType" />
-                                    <property name="enum" value="true" />
-                                </bean>
-                            </list>
-                        </property>
-                    </bean>
-                </property>
-            </bean>
-        </property>
-
-
-        <!-- Enable task execution events for examples. -->
-        <property name="includeEventTypes">
-            <list>
-                <!-- Task execution events -->
-                <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_STARTED"/>
-                <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_FINISHED"/>
-                <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_FAILED"/>
-                <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_TIMEDOUT"/>
-                <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_SESSION_ATTR_SET"/>
-                <util:constant static-field="org.apache.ignite.events.EventType.EVT_TASK_REDUCED"/>
-                
-                <!-- Job execution events -->
-                <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_MAPPED"/>
-                <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_RESULTED"/>
-                <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_FAILED_OVER"/>
-                <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_STARTED"/>
-                <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_FINISHED"/>
-                <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_TIMEDOUT"/>
-                <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_REJECTED"/>
-                <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_FAILED"/>
-                <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_QUEUED"/>
-                <util:constant static-field="org.apache.ignite.events.EventType.EVT_JOB_CANCELLED"/>
-            </list>
-        </property>		
-    </bean>
-</beans>